StandardizedActivation#

class sdm.prior.StandardizedActivation(activation: Activation, *, scale: HP[float] | float | None = None)#

Bases: Activation

Apply an activation at a random center and scale.

Parameters:
  • activation (Activation) – Activation applied to the centered and scaled values.

  • scale (HP[float] | float | None) – Scale after random centering. Defaults to Correlated(LogUniform(1.0, 10.0)).

forward(x: Tensor, generator: Generator | None = None) → Tensor#

Apply the activation to input values.

Parameters:
  • x (Tensor) – Input values.

  • generator (Generator | None) – Pseudorandom generator.

Return type:

Tensor