template.runner.bidimensional package¶
Submodules¶
template.runner.bidimensional.bidimensional module¶
This file is the template for the boilerplate of train/test of a DNN on a bidimensional dataset In particular, it is designed to work with clouds of bi-dimensional points.
-
class
template.runner.bidimensional.bidimensional.
Bidimensional
[source]¶ Bases:
template.runner.image_classification.image_classification.ImageClassification
-
static
single_run
(writer, current_log_folder, model_name, epochs, lr, decay_lr, validation_interval, checkpoint_all_epochs, **kwargs)[source]¶ This is the main routine where train(), validate() and test() are called.
- Parameters
writer (Tensorboard.SummaryWriter) – Responsible for writing logs in Tensorboard compatible format.
current_log_folder (string) – Path to where logs/checkpoints are saved
model_name (string) – Name of the model
epochs (int) – Number of epochs to train
lr (float) – Value for learning rate
kwargs (dict) – Any additional arguments.
decay_lr (boolean) – Decay the lr flag
validation_interval (int) – Run evaluation on validation set every N epochs
checkpoint_all_epochs (bool) – If enabled, save checkpoint after every epoch.
- Returns
train_value (ndarray[floats] of size (1, epochs)) – Accuracy values for train split
val_value (ndarray[floats] of size (1, `epochs`+1)) – Accuracy values for validation split
test_value (float) – Accuracy value for test split
-
static
Module contents¶
-
class
template.runner.bidimensional.
Bidimensional
[source]¶ Bases:
template.runner.image_classification.image_classification.ImageClassification
-
static
single_run
(writer, current_log_folder, model_name, epochs, lr, decay_lr, validation_interval, checkpoint_all_epochs, **kwargs)[source]¶ This is the main routine where train(), validate() and test() are called.
- Parameters
writer (Tensorboard.SummaryWriter) – Responsible for writing logs in Tensorboard compatible format.
current_log_folder (string) – Path to where logs/checkpoints are saved
model_name (string) – Name of the model
epochs (int) – Number of epochs to train
lr (float) – Value for learning rate
kwargs (dict) – Any additional arguments.
decay_lr (boolean) – Decay the lr flag
validation_interval (int) – Run evaluation on validation set every N epochs
checkpoint_all_epochs (bool) – If enabled, save checkpoint after every epoch.
- Returns
train_value (ndarray[floats] of size (1, epochs)) – Accuracy values for train split
val_value (ndarray[floats] of size (1, `epochs`+1)) – Accuracy values for validation split
test_value (float) – Accuracy value for test split
-
static