phenocam_snow.train
- train_model_with_new_data(model, learning_rate, weight_decay, site_name, label_method, n_train, n_test, classes)
Pipeline for building a model on new data.
- Parameters:
model (str) – The ResNet variant to use.
learning_rate (float) – The learning rate to use.
weight_decay (float) – The weight decay to use.
site_name (str) – The name of the PhenoCam site you want.
label_method (str) – How you wish to label images (“in notebook” or “via subdir”).
n_train (int) – The number of training images to use.
n_test (int) – The number of testing images to use.
classes (List[str]) – The image classes.
- Returns:
The best model obtained during training.
- Return type:
- train_model_with_existing_data(model, learning_rate, weight_decay, site_name, train_dir, test_dir, classes)
Pipeline for building model with already downloaded/labeled data.
- Parameters:
model (str) – The ResNet variant to use.
learning_rate (float) – The learning rate to use.
weight_decay (float) – The weight decay to use.
site_name (str) – The name of the PhenoCam site you want.
label_method (str) – How you wish to label images (“in notebook” or “via subdir”).
n_train (int) – The number of training images to use.
n_test (int) – The number of testing images to use.
classes (List[str]) – The image classes.
- Returns:
The best model obtained during training.
- Return type: