Weighting callbacks#
- class LinearWeightUpdate(target_epoch, condition_name, initial_value, target_value)[source]#
Bases:
Callback
Callback to linearly adjust the weight of a condition from an initial value to a target value over a specified number of epochs.
Callback initialization.
- Parameters:
- on_train_start(trainer, pl_module)[source]#
Initialize the weight of the condition to the specified
initial_value
.- Parameters:
pl_module (SolverInterface) – A
SolverInterface
instance.
- on_train_epoch_start(trainer, pl_module)[source]#
Adjust at each epoch the weight of the condition.
- Parameters:
pl_module (SolverInterface) – A
SolverInterface
instance.