constraints
NonNegative ¶
Bases: tf.keras.constraints.Constraint
Constraint that enforces positive activations.
__call__ ¶
1 | |
Clips negative values of a provided weight tensor w to 0.0 and leaves positive values unchanged.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
w |
tf.Tensor
|
Tensor containing the wehights of a layer. |
required |
Returns:
| Type | Description |
|---|---|
tf.Tensor
|
Tensor where negative values are clipped to 0.0. |
Source code in DeepSaki/constraints/constraints.py
7 8 9 10 11 12 13 14 15 16 | |