-
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
ValueError: If printing histograms, validation_data must be provided, and cannot be a generator. #50
Comments
I have also meet this error and I could not solve it yet ! Need help also! |
@xiaofengqing Comment out this code: # if K.backend() == 'tensorflow': Then it can run. |
Change histogram_freq=10 to histogram_freq=0 you can still use tensor board with this fix rather than removing it all together. |
It is general issue with keras/tboard that you cannot get histograms with a validation_generator, changing histogram_freq=0 stops it trying to produce them. |
@zwlshine @IsaacIsOkay |
How is turning histogram_freq to zero a fix?! I need those histograms. |
@mueller91 you can pass validation data separately to generate the histograms I think in a separate step, but yeah it isn't whats needed really. |
@mueller91 I am not sure if you still have this issue, but this issue keras-team/keras#3358 and the suggested solution by juiceboxjoe helped me. |
the original callbacks.py is with histogram_freq=0, but i still have ValueError: If printing histograms, validation_data must be provided, and cannot be a generator. |
Is there a method from a validation generator, that would just spit out a bunch of them to test with? |
What's the issue? Why it is not possible when the validation set is a generator? |
After i trained the first epoch,i meet this error
File "/home/s405/pengcheng/project/Keras-FCN/train.py", line 232, in
label_suffix=label_suffix, ignore_label=ignore_label, label_cval=label_cval)
File "/home/s405/pengcheng/project/Keras-FCN/train.py", line 164, in train
class_weight=class_weight
File "/usr/local/lib/python3.4/dist-packages/keras/legacy/interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/keras/engine/training.py", line 2082, in fit_generator
callbacks.on_epoch_end(epoch, epoch_logs)
File "/usr/local/lib/python3.4/dist-packages/keras/callbacks.py", line 77, in on_epoch_end
callback.on_epoch_end(epoch, logs)
File "/usr/local/lib/python3.4/dist-packages/keras/callbacks.py", line 751, in on_epoch_end
raise ValueError('If printing histograms, validation_data must be '
ValueError: If printing histograms, validation_data must be provided, and cannot be a generator.
I don't know how to fix this problem, can you give me some suggestions?
The text was updated successfully, but these errors were encountered: