Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Exception encountered when calling layer "sequential" (type Sequential) #673

Open
Tahagho82 opened this issue Aug 28, 2024 Discussed in #256 · 0 comments
Open

Comments

@Tahagho82
Copy link

Hi , I Can you fix this??❤

image
when i add the validation_data, i see blow erro:

Found 1500 images belonging to 2 classes.
Found 500 images belonging to 2 classes.
Epoch 1/5
46/47 ━━━━━━━━━━━━━━━━━━━━ 0s 98ms/step - accuracy: 0.6457 - loss: 0.6373

ValueError Traceback (most recent call last)
in <cell line: 52>()
50 metrics = ['accuracy'])
51
---> 52 history_1 = model_1.fit(train_data,
53 epochs=5,
54 steps_per_epoch = len(train_data),

1 frames
/usr/local/lib/python3.10/dist-packages/keras/src/layers/input_spec.py in assert_input_compatibility(input_spec, inputs, layer_name)
225 None,
226 }:
--> 227 raise ValueError(
228 f'Input {input_index} of layer "{layer_name}" is '
229 f"incompatible with the layer: expected axis {axis} "

ValueError: Exception encountered when calling Sequential.call().

Input 0 of layer "dense_9" is incompatible with the layer: expected axis -1 of input shape to have value 28090, but received input with shape (None, 30740)

Arguments received by Sequential.call():
• inputs=tf.Tensor(shape=(None, 224, 244, 3), dtype=float32)
• training=False
• mask=None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant