Accuracy¶
-
class
olympus.metrics.accuracy.AUC(frequency_new_epoch: int = 1, frequency_new_batch: int = 0, frequency_new_trial: int = 0, priority: int = 0, loader: torch.utils.data.dataloader.DataLoader = None, aucs: list = <factory>, pccs: list = <factory>, name: str = 'validation', eval_time: olympus.utils.stat.StatStream = <factory>, total_time: int = 0, metric_stream: <function Stream at 0x7f737ccfe950> = <factory>)[source]¶ Bases:
olympus.observers.observer.ObserverAttributes: - loader
Methods
every(*args[, epoch, batch])Define how often this metric should be called load_state_dict(state_dict)Load a state dictionary to resume a previous training on_end_train(task[, step])Called at the end of training after the last epoch on_new_batch(task, step[, input, context])Called after a batch has been processed on_new_epoch(task, epoch, context)Called at the end of an epoch, before a new epoch starts on_new_trial(task, step, parameters, uid)Called after a trial has been processed on_start_train(task[, step])Called on ce the training starts state_dict()Return a state dictionary used to checkpointing and resuming value()Return the key values that metrics computes compute_auc get_auc on_end_epoch -
frequency_new_batch= 0¶
-
frequency_new_epoch= 1¶
-
loader= None¶
-
name= 'validation'¶
-
on_start_train(task, step=None)[source]¶ Called on ce the training starts
Notes
You should not rely on this function to initialize your metric as it will not be called if the training is resumed from a previous state
-
total_time= 0¶
-
class
olympus.metrics.accuracy.Accuracy(frequency_new_epoch: int = 1, frequency_new_batch: int = 0, frequency_new_trial: int = 0, priority: int = 0, loader: torch.utils.data.dataloader.DataLoader = None, accuracies: list = <factory>, losses: list = <factory>, name: str = 'validation', eval_time: olympus.utils.stat.StatStream = <factory>, total_time: int = 0, metric_stream: <function Stream at 0x7f737ccfe950> = <factory>)[source]¶ Bases:
olympus.observers.observer.ObserverAttributes: - loader
Methods
every(*args[, epoch, batch])Define how often this metric should be called load_state_dict(state_dict)Load a state dictionary to resume a previous training on_end_train(task[, step])Called at the end of training after the last epoch on_new_batch(task, step[, input, context])Called after a batch has been processed on_new_epoch(task, epoch, context)Called at the end of an epoch, before a new epoch starts on_new_trial(task, step, parameters, uid)Called after a trial has been processed on_start_train(task[, step])Called on ce the training starts state_dict()Return a state dictionary used to checkpointing and resuming value()Return the key values that metrics computes compute_accuracy get_accuracy on_end_epoch -
frequency_new_batch= 0¶
-
frequency_new_epoch= 1¶
-
loader= None¶
-
name= 'validation'¶
-
on_start_train(task, step=None)[source]¶ Called on ce the training starts
Notes
You should not rely on this function to initialize your metric as it will not be called if the training is resumed from a previous state
-
total_time= 0¶
-
class
olympus.metrics.accuracy.OnlineTrainAccuracy(frequency_new_epoch: int = 0, frequency_new_batch: int = 0, frequency_new_trial: int = 0, priority: int = 0, accuracies: list = <factory>, losses: list = <factory>, accumulator: int = 0, loss: int = 0, count: int = 0, frequency_end_epoch: int = 1, frequency_end_batch: int = 1) → None[source]¶ Bases:
olympus.observers.observer.ObserverReuse precomputed loss and prediction to get accuracy because the model is updated in between each batch, this does not return the true accuracy on the training set,
Methods
every(*args[, epoch, batch])Define how often this metric should be called load_state_dict(state_dict)Load a state dictionary to resume a previous training on_end_train(task[, step])Called at the end of training after the last epoch on_new_batch(task, step[, input, context])Called after a batch has been processed on_new_epoch(task, epoch, context)Called at the end of an epoch, before a new epoch starts on_new_trial(task, step, parameters, uid)Called after a trial has been processed on_start_train(task[, step])Called on ce the training starts state_dict()Return a state dictionary used to checkpointing and resuming value()Return the key values that metrics computes on_end_batch on_end_epoch -
accumulator= 0¶
-
count= 0¶
-
frequency_end_batch= 1¶
-
frequency_end_epoch= 1¶
-
loss= 0¶
-