Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Add train script example #50

wants to merge 6 commits into from

Conversation

makrout
Copy link

@makrout makrout commented Feb 14, 2020

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.

@makrout makrout requested a review from jsalbert February 14, 2020 18:05
@@ -0,0 +1,61 @@
import os
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in filename ⚠️

Copy link
Contributor

@jsalbert jsalbert left a 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",
Copy link
Contributor

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),
Copy link
Contributor

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),
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants