Skip to content

chapter-4/1_feature_extraction.ipynb using default batch size 32 instead of defined batch_size 128 #164

Description

@gitgithan
batch_size = 128
datagen = tensorflow.keras.preprocessing.image.ImageDataGenerator(preprocessing_function=preprocess_input)

generator = datagen.flow_from_directory(root_dir,
                                        target_size=(224, 224),
                                        class_mode=None,
                                        shuffle=False)

uses default batch_size = 32.

num_epochs = int(math.ceil(num_images / batch_size))
calculates 68 epochs based on 128 batch size.
So generator only generates 68*32 = 2176 images for feature_list, mismatching the 8677 in standard_feature_list with features extracted from the non generator method.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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