Skip to content

regularizer

allennlp.nn.regularizers.regularizer

[SOURCE]


Regularizer

class Regularizer(Registrable)

An abstract class representing a regularizer. It must implement call, returning a scalar tensor.

default_implementation

class Regularizer(Registrable):
 | ...
 | default_implementation = "l2"

__call__

class Regularizer(Registrable):
 | ...
 | def __call__(self, parameter: torch.Tensor) -> torch.Tensor