Error when checking target: ValueError: expected regression to have shape (None, None, 4)
See original GitHub issueI’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)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Error when checking target: expected dense_2 to have shape ...
My data is not of images (yet) but they are sequences I've turned in to data frames. model = Sequential() model.add(Dense(30, input_dim=16, ...
Read more >ValueError: Error when checking target: expected dense_14 to ...
My understanding of the structure is that my input of (928,4,4,512) which sets the input shape to the flatten_9 layer at (none, ...
Read more >valueerror: the target 'y' needs to have more than 1 class. got 1 class ...
I'm having trouble with the RandomOverSampler throwing an error on the number of classes in the y input. When I use the below...
Read more >'Error when checking model input: expected no data, but got ...
I'm trying to build an inception and resnet model with my own image data. The dataset is 8000 images in total and has...
Read more >Shaping and reshaping NumPy and pandas objects to avoid ...
If our data were stored in a 1D NumPy array, then we could do what the error message suggests and turn it into...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
This should be fixed with keras 2.1.2, closing this issue.