LossBase

class packnet_sfm.losses.loss_base.LossBase[source]

Bases: torch.nn.modules.module.Module

Base class for losses.

add_metric(key, val)[source]

Add a new metric to the dictionary and detach it.

property logs

Return logs.

property metrics

Return metrics.

class packnet_sfm.losses.loss_base.ProgressiveScaling(progressive_scaling, num_scales=4)[source]

Bases: object

Helper class to manage progressive scaling. After a certain training progress percentage, decrease the number of scales by 1.

Parameters
  • progressive_scaling (float) – Training progress percentage where the number of scales is decreased

  • num_scales (int) – Initial number of scales