dacapo.store.weights_store

Module Contents

Classes

Weights

WeightsStore

Base class for network weight stores.

class dacapo.store.weights_store.Weights(model_state_dict, optimizer_state_dict)
optimizer: collections.OrderedDict[str, torch.Tensor]
model: collections.OrderedDict[str, torch.Tensor]
class dacapo.store.weights_store.WeightsStore

Base class for network weight stores.

load_weights(run: dacapo.experiments.run.Run, iteration: int) None

Load this iterations weights into the given run.

load_best(run: dacapo.experiments.run.Run, dataset: str, criterion: str) None

Load the best weights for this Run,dataset,criterion into Run.model

abstract latest_iteration(run: str) int | None

Return the latest iteration for which weights are available for the given run.

abstract store_weights(run: dacapo.experiments.run.Run, iteration: int) None

Store the network weights of the given run.

abstract retrieve_weights(run: str, iteration: int) Weights

Retrieve the network weights of the given run.

abstract remove(run: str, iteration: int) None

Delete the weights associated with a specific run/iteration

abstract retrieve_best(run: str, dataset: str, criterion: str) int

Retrieve the best weights for this run/dataset/criterion