Example #1
0
    val_dir,
    target_size=(256, 256),
    batch_size=25,
    class_mode='sparse'
)
# %%
# Model

m = Models(dataset)

if model_type == 'child_':
    model = m.child_()
elif model_type == 'young_':
    model = m.young_()
else:
    model = m.adult_()

model.summary()

# %%
# Training the model
s = time.time()
history = model.fit_generator(
    train_generator,
    steps_per_epoch=spe, epochs=epochs,
    validation_data=val_generator, validation_steps=vspe,
    verbose=1
)
e = time.time()
print('========================================================================')
time_taken = e - s