PSerf#

class myoverse.models.components.activation_functions.PSerf(gamma=1.0, sigma=1.25, stabilisation_term=1e-12)[source]#

PSerf activation function from Biswas et al.

Parameters:
  • gamma (float, optional) – The gamma parameter, by default 1.0.

  • sigma (float, optional) – The sigma parameter, by default 1.25.

  • stabilisation_term (float, optional) – The stabilisation term, by default 1e-12.

References

Biswas, K., Kumar, S., Banerjee, S., Pandey, A.K., 2021. ErfAct and PSerf: Non-monotonic smooth trainable Activation Functions. arXiv:2109.04386 [cs].

Initialize internal Module state, shared by both nn.Module and ScriptModule.

Methods

__init__([gamma, sigma, stabilisation_term])

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(x)

Define the computation performed at every call.

forward(x)[source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Parameters:

x (Tensor)

Return type:

Tensor