-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'SegDirectoryIterator' object has no attribute 'next' #68
Comments
@unixnme @ahundt @PavlosMelissinos @aurora95 please! |
hey, do u handle this issue? I meet the question too. |
@simonsayshi, @zy937085318 I have the following solution: You should also add the following in your new next function:
|
@cemsaz I'm running it on python3 and it works fine. Doesn't seem to be problem in python3 as in general. |
@cemsaz I have the same problem. Could you please specify in which script and in which lines I should do the replacement? |
Would someone be willing to explicitly post the solution to this issue? I am having a hard time getting around it. Thank you!! |
@simonsayshi Could you tell me your final solution? Thank U very much |
@daodao1991 plz follow the instruction above.. |
@simonsayshi I run it on Ubuntu16.04 ,and try tensorflow-gpu 1.3.0/1.2.1 with keras 2.0.8/2.1.2,and Python3.6/2.7 have been used. I just fail again and again,which drives me crazy. Please help me!! |
attach your full log maybe?dont know how to run in ubuntu but logs may help
a lot
…On Wed, Aug 21, 2019 at 21:37 daodao1991 ***@***.***> wrote:
@simonsayshi <https://github.com/simonsayshi> I run it on Ubuntu16.04
,and try tensorflow-gpu 1.3.0/1.2.1 with keras 2.0.8/2.1.2,and
Python3.6/2.7 have been used. I just fail again and again,which drives me
crazy. Please help me!!
I know this repository is good, but I cann't run it. So frustrated!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#68?email_source=notifications&email_token=AHQ4RSTLT2GG63MQUF4ZPTTQFYJWPA5CNFSM4ESIT7P2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD433HBY#issuecomment-523744135>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHQ4RSSAVJSAHDR47NZZOALQFYJWPANCNFSM4ESIT7PQ>
.
|
@simonsayshi Thank u for your reply, I change to win 10, and install tensorflow-gpu 1.4.0 && keras 2.1.2 && python 3.5 , but also failed. This is error logs: (tf_1_4) F:\Pycharm_Projects\FCN\aurora95\Keras-FCN>python train.py I change it to keras 2.0.8, it will go back to the old error, |
@simonsayshi Hi, I fix the above problem by copying the revalent from a previous version of keras which included it. But .... Trainable params: 134,346,581 My new question is, the following error occurs when the program reads an image, it seems like GPU resource exhausted : ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[7,7,512,4096] The strange thing is that my program has the following code: |
https://github.com/aurora95/Keras-FCN/pull/56/files#diff-884514ab248f7857177828d3a62cbdc5R194 shows the changed made for keras==2.1.x, as i use keras==2.0.8, i go back to the origin code, the code is of utils/SegGenerator.py. |
@ahundt @aurora95 need help here!!
I met this issue when I run train.py
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\ProgramData\Anaconda3\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\data_utils.py", line 568, in data_generator_task
generator_output = next(self._generator)
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\preprocessing\image.py", line 737, in next
return self.next(*args, **kwargs)
AttributeError: 'SegDirectoryIterator' object has no attribute 'next'
lr: 0.010000
Epoch 1/250
Traceback (most recent call last):
File "train.py", line 233, in
label_suffix=label_suffix, ignore_label=ignore_label, label_cval=label_cval)
File "train.py", line 163, in train
class_weight=class_weight
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\training.py", line 2011, in fit_generator
generator_output = next(output_generator)
StopIteration
I debugged for all day and have no idea why is that happening :(
my sys Env is win10 python3.6 keras 2.0.8 tensorflow 1.2.1 any suggestion?
Thanks a lot!!!!
The text was updated successfully, but these errors were encountered: