Я не могу решить эту ошибку. Кто-нибудь может решить эту ошибку? Я буду очень благодарен заранее.
Ниже я приложил свой код и ошибку этого кода:
ValueError Traceback (most recent call last)
<ipython-input-65-ec0e93dabcc7> in <module>
82 # hist = model.fit(X_train, y_train, batch_size=58, nb_epoch=10, validation_split = 0.1, verbose = 1)
83 hist=model.fit(X_train,y_train,batch_size=128,epochs=10,
---> 84 validation_split=0.2,callbacks=[EarlyStopping(monitor='val_loss',min_delta=0.0001)])
85
86 score, acc = model.evaluate(X_test, y_test, batch_size=1)
~\Anaconda3\lib\site-packages\keras\engine\training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, **kwargs)
950 sample_weight=sample_weight,
951 class_weight=class_weight,
--> 952 batch_size=batch_size)
953 # Prepare validation data.
954 do_validation = False
~\Anaconda3\lib\site-packages\keras\engine\training.py in _standardize_user_data(self, x, y, sample_weight, class_weight, check_array_lengths, batch_size)
749 feed_input_shapes,
750 check_batch_axis=False, # Don't enforce the batch size.
--> 751 exception_prefix='input')
752
753 if y is not None:
~\Anaconda3\lib\site-packages\keras\engine\training_utils.py in standardize_input_data(data, names, shapes, check_batch_axis, exception_prefix)
100 'Expected to see ' + str(len(names)) + ' array(s), '
101 'but instead got the following list of ' +
--> 102 str(len(data)) + ' arrays: ' + str(data)[:200] + '...')
103 elif len(names) > 1:
104 raise ValueError(
ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 1 array(s), but instead got the following list of 58 arrays: [array([[5.80e+17],
[5.80e+17],
[5.80e+17],
[5.80e+17],
[5.80e+17],
[5.80e+17],
[5.80e+17],
[5.80e+17],
[5.80e+17],
[5.80e+17],
[5...
Основная ошибка
Список Numpy массивы, передаваемые в модель, не соответствуют ожидаемой модели
Я приложил снимок экрана с кодом, вызывающим ошибку: https://i.stack.imgur.com/MdGN7.png