pymic.net_run.self_sup package
Submodules
pymic.net_run.self_sup.self_sl_agent module
- class pymic.net_run.self_sup.self_sl_agent.SelfSLSegAgent(config, stage='train')
Bases:
SegmentationAgentAbstract class for self-supervised segmentation.
- Parameters:
config – (dict) A dictionary containing the configuration.
stage – (str) One of the stage in train (default), inference or test.
Note
In the configuration dictionary, in addition to the four sections (dataset, network, training and inference) used in fully supervised learning, an extra section semi_supervised_learning is needed. See Semi-Supervised Learning for details.
- create_loss_calculator()
Create loss function object.
- train_valid()
Train and valid.
- training()
Train the network
- validation()
Evaluate the performance on the validation set.
- write_scalars(train_scalars, valid_scalars, lr_value, glob_it)
Write scalars using SummaryWriter.
- Parameters:
train_scalars – (dictionary) Scalars for training set.
valid_scalars – (dictionary) Scalars for validation set.
lr_value – (float) Current learning rate.
glob_it – (int) Current iteration number.
- pymic.net_run.self_sup.self_sl_agent.random() x in the interval [0, 1).