Skip to content
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

output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None #13

Closed
GilbertZhang opened this issue Mar 6, 2018 · 3 comments

Comments

@GilbertZhang
Copy link

When I try to run unet_buildings.py, I encounter this issue. I changed the channel from 16+3 to only RGB channels but I don't think that will cause the issue.

Here are the traceback:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/root/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/root/anaconda3/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/root/anaconda3/lib/python3.6/site-packages/keras/engine/training.py", line 429, in data_generator_task
generator_output = next(self._generator)
TypeError: 'threadsafe_iter' object is not an iterator
Epoch 1/50

Traceback (most recent call last):
File "unet_buildings.py", line 278, in
nb_worker=8
File "/root/anaconda3/lib/python3.6/site-packages/keras/engine/training.py", line 1532, in fit_generator
str(generator_output))
ValueError: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None

@cepera-ang
Copy link
Collaborator

I bet you have some very modern Keras and probably it will require to rewrite a fair amount of this code to correctly run this on newer versions. Sorry, we no longer have the need to use this code and don't maintain it due to lack of time. If you manage to finally run it -- send pull requests, please!

@GilbertZhang
Copy link
Author

Hi there,

Really thanks for replying! I actually installed Keras=1.2.2 and theano=0.9.0 on my sever and produced the issue above. May I just ask a last question, which version of h5py you are using in the repo?

Thanks with regards,
Gilbert

@cepera-ang
Copy link
Collaborator

Unfortunately, I don't remember the exact version, probably one that was active around start of the 2017.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants