Skip to content

Dimension Error #3

Description

@osho-agyeya

Hi, I tried to apply this on my dataset which has 50 classes and folder structure is correct. But I got an error for

# we train our model again (this time fine-tuning the top 2 inception blocks
# alongside the top Dense layers
history_ft = model.fit_generator(
    train_generator,
    steps_per_epoch=len(train_generator.filenames) // batch_size,
    epochs=fit_epochs,
    validation_data=validation_generator,
    validation_steps=len(validation_generator.filenames) // batch_size,
    callbacks=[mc_fit, tb])

as
ValueError: Error when checking target: expected dense_2 to have 4 dimensions, but got array with shape (16, 50)

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