analogvnn.nn.normalize.LPNorm
#
Module Contents#
Classes#
Implements the row-wise Lp normalization function. |
|
Implements the whole matrix Lp normalization function. |
|
Implements the row-wise L1 normalization function. |
|
Implements the row-wise L2 normalization function. |
|
Implements the whole matrix L1 normalization function. |
|
Implements the whole matrix L2 normalization function. |
|
Implements the row-wise L1 normalization function with maximum absolute value of 1. |
|
Implements the row-wise L2 normalization function with maximum absolute value of 1. |
|
Implements the whole matrix L1 normalization function with maximum absolute value of 1. |
|
Implements the whole matrix L2 normalization function with maximum absolute value of 1. |
- class analogvnn.nn.normalize.LPNorm.LPNorm(p: int, make_max_1=False)[source]#
Bases:
analogvnn.nn.normalize.Normalize.Normalize
,analogvnn.backward.BackwardIdentity.BackwardIdentity
Implements the row-wise Lp normalization function.
- Variables:
- forward(x: torch.Tensor) torch.Tensor [source]#
Forward pass of row-wise Lp normalization function.
- Parameters:
x (Tensor) – the input tensor.
- Returns:
the output tensor.
- Return type:
Tensor
- class analogvnn.nn.normalize.LPNorm.LPNormW(p: int, make_max_1=False)[source]#
Bases:
LPNorm
Implements the whole matrix Lp normalization function.
- forward(x: torch.Tensor) torch.Tensor [source]#
Forward pass of whole matrix Lp normalization function.
- Parameters:
x (Tensor) – the input tensor.
- Returns:
the output tensor.
- Return type:
Tensor
- class analogvnn.nn.normalize.LPNorm.L1Norm[source]#
Bases:
LPNorm
Implements the row-wise L1 normalization function.
- class analogvnn.nn.normalize.LPNorm.L2Norm[source]#
Bases:
LPNorm
Implements the row-wise L2 normalization function.
- class analogvnn.nn.normalize.LPNorm.L1NormW[source]#
Bases:
LPNormW
Implements the whole matrix L1 normalization function.
- class analogvnn.nn.normalize.LPNorm.L2NormW[source]#
Bases:
LPNormW
Implements the whole matrix L2 normalization function.
- class analogvnn.nn.normalize.LPNorm.L1NormM[source]#
Bases:
LPNorm
Implements the row-wise L1 normalization function with maximum absolute value of 1.
- class analogvnn.nn.normalize.LPNorm.L2NormM[source]#
Bases:
LPNorm
Implements the row-wise L2 normalization function with maximum absolute value of 1.