hy2dl.training

hy2dl.training.get_loss(cfg: Config) BaseLoss

Get loss object, depending on the run configuration.

Parameters:

cfg (Config) – The run configuration.

Returns:

A new loss instance of the type specified in the config.

Return type:

loss_module.BaseLoss