-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add train script example #50
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,61 @@ | |||
import os |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in filename
…d/keras-trainer into add-train-script-example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, some comments below! :)
trainer_args = { | ||
'train_generator': EnhancedImageDataGenerator().flow_from_dataframe( | ||
train_dataframe, | ||
x_col="storage_key", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we agreed on using filename
as column name?
trainer = Trainer( | ||
train_dataset_dir=root_directory, | ||
val_dataset_dir=root_directory, | ||
output_model_dir="./{}_model_dir".format(architecture), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe set this as a parameter on top of the script in case you have two models with the same architecture
train_dataset_dir=root_directory, | ||
val_dataset_dir=root_directory, | ||
output_model_dir="./{}_model_dir".format(architecture), | ||
output_logs_dir="./{}_log_dir".format(architecture), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe set this as a parameter on top of the script in case you have two models with the same architecture
I added an example of a train script using the data generators that might be a useful starting point to quickly start training models with.