regularizer
allennlp.nn.regularizers.regularizer
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