![]() |
Belle II Software development
|
Public Member Functions | |
__init__ (self, num_svs, num_itrs, num_outputs, transpose=False, eps=1e-12) | |
u (self) | |
sv (self) | |
W_ (self) | |
Public Attributes | |
num_itrs = num_itrs | |
Number of power iterations per step. | |
num_svs = num_svs | |
Number of singular values. | |
transpose = transpose | |
Transposed? | |
eps = eps | |
Epsilon value for avoiding divide-by-0. | |
bool | training |
Training mode flag (inherited from nn.Module). | |
Spectral normalization base class This base class expects subclasses to have a learnable weight parameter (`self.weight`) as in `nn.Linear` or `nn.Conv2d`. It provides a method to apply spectral normalization to that weight. Attributes: num_svs (int): Number of singular values. num_itrs (int): Number of power iterations per step. transpose (bool): Whether to transpose the weight matrix. eps (float): Small constant to avoid divide-by-zero. u (list[Tensor]): Registered left singular vectors (buffers). sv (list[Tensor]): Registered singular values (buffers). training (bool): Inherited from nn.Module. True if in training mode.
__init__ | ( | self, | |
num_svs, | |||
num_itrs, | |||
num_outputs, | |||
transpose = False, | |||
eps = 1e-12 ) |
constructor
Definition at line 244 of file ieagan.py.
sv | ( | self | ) |
Singular values note that these buffers are just for logging and are not used in training.
Definition at line 271 of file ieagan.py.
u | ( | self | ) |
W_ | ( | self | ) |
Compute the spectrally-normalized weight
Definition at line 278 of file ieagan.py.
bool training |