gluonts.torch.support.util module

gluonts.torch.support.util.copy_parameters(net_source: torch.nn.modules.module.Module, net_dest: torch.nn.modules.module.Module, strict: Optional[bool] = True) → None[source]

Copies parameters from one network to another.

Parameters
  • net_source – Input network.

  • net_dest – Output network.

  • strict – whether to strictly enforce that the keys in state_dict match the keys returned by this module’s state_dict() function. Default: True