Belle II Software development
SNLinear Class Reference
Inheritance diagram for SNLinear:
SN

Public Member Functions

def __init__ (self, in_features, out_features, bias=True, num_svs=1, num_itrs=1, eps=1e-12)
 Constructor.
 
def forward (self, x)
 forward
 

Detailed Description

Linear layer with spectral norm

Definition at line 330 of file ieagan.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  in_features,
  out_features,
  bias = True,
  num_svs = 1,
  num_itrs = 1,
  eps = 1e-12 
)

Constructor.

Reimplemented from SN.

Definition at line 336 of file ieagan.py.

344 ):
345 nn.Linear.__init__(self, in_features, out_features, bias)
346 SN.__init__(self, num_svs, num_itrs, out_features, eps=eps)
347

Member Function Documentation

◆ forward()

def forward (   self,
  x 
)

forward

Definition at line 349 of file ieagan.py.

349 def forward(self, x):
350 return F.linear(x, self.W_(), self.bias)
351
352

The documentation for this class was generated from the following file: