Untitled
unknown
plain_text
6 months ago
1.8 kB
2
Indexable
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[13], line 5 1 from tensorflow.keras.callbacks import EarlyStopping 4 # Huấn luyện model với callback ----> 5 history = model.fit(X_train, y_train, epochs=30,validation_data=(X_val, y_val)) 7 model.save('my_model.h5') File /opt/conda/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py:122, in filter_traceback.<locals>.error_handler(*args, **kwargs) 119 filtered_tb = _process_traceback_frames(e.__traceback__) 120 # To get the full stack trace, call: 121 # `keras.config.disable_traceback_filtering()` --> 122 raise e.with_traceback(filtered_tb) from None 123 finally: 124 del filtered_tb File /opt/conda/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py:122, in filter_traceback.<locals>.error_handler(*args, **kwargs) 119 filtered_tb = _process_traceback_frames(e.__traceback__) 120 # To get the full stack trace, call: 121 # `keras.config.disable_traceback_filtering()` --> 122 raise e.with_traceback(filtered_tb) from None 123 finally: 124 del filtered_tb ValueError: Exception encountered when calling MaxPooling2D.call(). Negative dimension size caused by subtracting 2 from 1 for '{{node sequential_2_1/max_pooling2d_13_1/MaxPool2d}} = MaxPool[T=DT_FLOAT, data_format="NHWC", explicit_paddings=[], ksize=[1, 2, 2, 1], padding="VALID", strides=[1, 2, 2, 1]](sequential_2_1/batch_normalization_15_1/batchnorm/add_1)' with input shapes: [?,1,32,128]. Arguments received by MaxPooling2D.call(): • inputs=tf.Tensor(shape=(None, 1, 32, 128), dtype=float32)
Editor is loading...
Leave a Comment