I'm trying to train with my own dataset in a csv but I get this:
Epoch 1/20
Traceback (most recent call last):
File "examples/train_csv.py", line 117, in <module>
keras.callbacks.ReduceLROnPlateau(monitor='loss', factor=0.1, patience=2, verbose=1, mode='auto', epsilon=0.0001, cooldown=0, min_lr=0),
File "/home/Team09/Desktop/SOEN321/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "/home/Team09/Desktop/SOEN321/lib/python3.6/site-packages/keras/engine/training.py", line 2114, in fit_generator
class_weight=class_weight)
File "/home/Team09/Desktop/SOEN321/lib/python3.6/site-packages/keras/engine/training.py", line 1826, in train_on_batch
check_batch_axis=True)
File "/home/Team09/Desktop/SOEN321/lib/python3.6/site-packages/keras/engine/training.py", line 1411, in _standardize_user_data
exception_prefix='target')
File "/home/Team09/Desktop/SOEN321/lib/python3.6/site-packages/keras/engine/training.py", line 153, in _standardize_input_data
str(array.shape))
ValueError: Error when checking target: expected regression to have shape (None, None, 4) but got array with shape (32, 67995, 5)
That is a bug in the latest version of Keras. Try using Keras 2.0.9.
Side note: could you leave this issue open? There are a lot of people experiencing this problem. Will help them to find it.
Yes that worked for me.
Thanks for the help.
yes, the error is keras 2.1.1 bug, It change to keras 2.0.9 , it is work
Modified the title to help people find the issue quickly.
And if I can add something from my own experience: DON'T try to install keras in version lower than 2.0.9 - listen to authors. Just had an issue with keras 2.0.8 and line 99 in retinanet.py: outputs = keras.layers.Reshape((-1, 4), name='pyramid_regression_reshape')(outputs) - received following error: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Is this bug fixed in keras master branch?
Yes.
This should be fixed with keras 2.1.2, closing this issue.
Most helpful comment
That is a bug in the latest version of Keras. Try using Keras 2.0.9.
Side note: could you leave this issue open? There are a lot of people experiencing this problem. Will help them to find it.