-
Notifications
You must be signed in to change notification settings - Fork 938
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 #130
Comments
This is the kind of issue that you can debug yourself relatively easily with a few simple print statements inside You'll find out that either of the following two cases occur.
And so on. There is no magic going on here, you simply examine what the content of |
@pierluigiferrari Thank you very much for your suggestion. There is indeed an empty array in the print.and I will print out the image name to see which one it is .but after changing batch_sise, every time something goes wrong, the picture is different, so I don't know how to solve it. Please help me |
It doesn't matter what the concrete pictures in a given batch are or that they change in every new batch. You still simply proceed with the debugging process I laid out above. |
Please help me. There are some images in my test set that have no target, so there is no label. The following error is now detected: |
What you posted in your last post might actually be a bug. The data generator works fine if all images have ground truth or if none of the images have ground truth, but if only some images don't have ground truth, it treats them as if they should have ground truth. I will fix this as soon as I find the time. In general, please mind the following things:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
HI @pierluigiferrari , have you fixed this bug yet? |
please help me
when i run ssd_training.ipynb,my data is 300*300,but have error
Epoch 1/120
1/2 [==============>...............] - ETA: 4s - loss: 23.7398Exception in thread Thread-6:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 612, in data_generator_task
generator_output = next(self._generator)
File "/media/y/2T/wangxingli/TT100K/ssd_keras/data_generator/object_detection_2d_data_generator.py", line 1136, in generate
"must be homogenous in size along all axes.")
data_generator.object_detection_2d_data_generator.DegenerateBatchError: You produced an empty batch. This might be because the images in the batch vary in their size and/or number of channels. Note that after all transformations (if any were given) have been applied to all images in the batch, all images must be homogenous in size along all axes.
Traceback (most recent call last):
File "ssd300_training.py", line 457, in
initial_epoch=initial_epoch)
File "/usr/local/lib/python3.5/dist-packages/keras/legacy/interfaces.py", line 88, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 1924, in fit_generator
pickle_safe=pickle_safe)
File "/usr/local/lib/python3.5/dist-packages/keras/legacy/interfaces.py", line 88, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 2010, in evaluate_generator
str(generator_output))
ValueError: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None
I check my data sets, no size is not consistent, and I in the other size of the data set can be, I've been looking around for a day, I have not found any problem, please help me
The text was updated successfully, but these errors were encountered: