Skip to content

Instantly share code, notes, and snippets.

@OlafenwaMoses
Created June 28, 2019 13:23
Show Gist options
  • Save OlafenwaMoses/254a82256b260435ba5da6e2d020cad9 to your computer and use it in GitHub Desktop.
Save OlafenwaMoses/254a82256b260435ba5da6e2d020cad9 to your computer and use it in GitHub Desktop.
from imageai.Prediction.Custom import ModelTraining
trainer = ModelTraining()
trainer.setModelTypeAsResNet()
trainer.setDataDirectory("fruits")
trainer.trainModel(num_objects=5, num_experiments=50, enhance_data=True, save_full_model=True, batch_size=32, show_network_summary=True, transfer_from_model="resnet50_weights_tf_dim_ordering_tf_kernels.h5", initial_num_objects=1000, transfer_with_full_training=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment