Skip to content

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

Open
@Tahagho82

Description

@Tahagho82

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions