L2
tflearn.losses.L2 (tensor, wd=0.001)
Computes half the L2 norm of a tensor without the sqrt
:
output = sum(t ** 2) / 2 * wd
Arguments
- tensor:
Tensor
. The tensor to apply regularization. - wd:
float
. The decay.
Returns
The regularization Tensor
.
L1
tflearn.losses.L1 (tensor, wd=0.001)
Computes the L1 norm of a tensor:
output = sum(|t|) * wd
Arguments
- tensor:
Tensor
. The tensor to apply regularization. - wd:
float
. The decay.
Returns
The regularization Tensor
.