Я использовал CNN и получил эту ошибку.
r = model.fit(X_train, y_train, validation_data=(X_test, y_test), epochs=50)
Это был код
, и вот ошибка, плз, помогите мне ее решить.
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-82-0b7c2e7fa2ce> in <module>()
----> 1 r = model.fit(X_train, y_train, validation_data=(X_test, y_test), epochs=50)
6 frames
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/engine/training_utils.py in check_loss_and_target_compatibility(targets, loss_fns, output_shapes)
808 raise ValueError('A target array with shape ' + str(y.shape) +
809 ' was passed for an output of shape ' + str(shape) +
--> 810 ' while using as loss `' + loss_name + '`. '
811 'This loss expects targets to have the same shape '
812 'as the output.')
ValueError: A target array with shape (687, 809) was passed for an output of shape (None, 25) while using as loss `binary_crossentropy`. This loss expects targets to have the same shape as the output.