l2_regularization
L2Regularizaton
¶
Bases: TensorOp
Calculate L2 Regularization Loss.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
inputs |
str
|
String key representing input loss. |
required |
outputs |
str
|
String key under which to store the computed loss value. |
required |
mode |
Union[None, str, Iterable[str]]
|
What mode(s) to execute this Op in. For example, "train", "eval", "test", or "infer". To execute regardless of mode, pass None. To execute in all modes except for a particular one, you can pass an argument like "!infer" or "!train". |
None
|
model |
Union[Model, Module]
|
A tensorflow or pytorch model |
required |
beta |
float
|
The multiplicative factor, to weight the l2 regularization loss with the input loss |
0.01
|