noether.core.utils.model

Functions

copy_params(source_model, target_model)

Copy parameters and buffers from source_model to target_model.

compute_model_norm(module)

Norm of all weights of a module (useful for init sanity checks).

update_ema(source_model, target_model, target_factor)

Update the target model with an exponential moving average of the source model.

Module Contents

noether.core.utils.model.copy_params(source_model, target_model)

Copy parameters and buffers from source_model to target_model.

Parameters:
Return type:

None

noether.core.utils.model.compute_model_norm(module)

Norm of all weights of a module (useful for init sanity checks).

Parameters:

module (torch.nn.Module)

Return type:

torch.Tensor

noether.core.utils.model.update_ema(source_model, target_model, target_factor, copy_buffers=False)

Update the target model with an exponential moving average of the source model.

Parameters:
Return type:

None