L2
tflearn.losses.L2 (tensor, wd=0.001)
計算 tensor 的一半 L2 規範,沒有 sqrt
output = sum(t ** 2) / 2 * wd
引數
- tensor:
Tensor
. 要套用規範化的 tensor。 - wd:
浮點數
. 衰減。
傳回值
規範化 Tensor
。
L1
tflearn.losses.L1 (tensor, wd=0.001)
計算 tensor 的 L1 規範
output = sum(|t|) * wd
引數
- tensor:
Tensor
. 要套用規範化的 tensor。 - wd:
浮點數
. 衰減。
傳回值
規範化 Tensor
。