parameters: (self,
                   size,
                   bias=True,
                   transpose=False,
                   weights=[],
                   activation=None,
                   name=None,
                   data_layout='data_parallel',
                   parallel_strategy={})
docstring: Initialize fully-connected module.
  
          Args:
              size (int): Size of output tensor.
              activation (type): Layer class for activation function.
              bias (bool): Whether to apply bias after linearity.
              transpose (bool): Whether to apply transpose of weights
                  matrix.
              weights (`Weights` or iterator of `Weights`): Weights in
                  fully-connected layer. There are at most two: the
                  matrix and the bias. If weights are not provided, the
                  matrix will be initialized with He normal
                  initialization and the bias with zeros.
              name (str): Default name is in the form 'fcmodule<index>'.
              data_layout (str): Data layout.
              parallel_strategy (dict): Data partitioning scheme.
docstring_summary: Initialize fully-connected module.
docstring_tokens: Initialize fully - connected module .
function: def __init__(self,
                   size,
                   bias=True,
                   transpose=False,
                   weights=[],
                   activation=None,
                   name=None,
                   data_layout='data_parallel',
                   parallel_strategy={}):
          """Initialize fully-connected module.
  
          Args:
              size (int): Size of output tensor.
              activation (type): Layer class for activation function.
              bias (bool): Whether to apply bias after linearity.
              transpose (bool): Whether to apply transpose of weights
                  matrix.
              weights (`Weights` or iterator of `Weights`): Weights in
                  fully-connected layer. There are at most two: the
                  matrix and the bias. If weights are not provided, the
                  matrix will be initialized with He normal
                  initialization and the bias with zeros.
              name (str): Default name is in the form 'fcmodule<index>'.
              data_layout (str): Data layout.
              parallel_strategy (dict): Data partitioning scheme.
  
          """
          super().__init__()
          FullyConnectedModule.global_count += 1
          self.instance = 0
          self.size = size
          self.bias = bias
          self.transpose = transpose
          self.data_layout = data_layout
          self.parallel_strategy = parallel_strategy
  
          self.name = (name
                       if name
                       else 'fcmodule{0}'.format(FullyConnectedModule.global_count))
  
          # Initialize weights
          # Note: If weights are not provided, matrix weights are
          # initialized with He normal scheme and bias weights are
          # initialized with zeros.
          self.weights = list(make_iterable(weights))
          if len(self.weights) > 2:
              raise ValueError('`FullyConnectedModule` has '
                               'at most two weights, '
                               'but got {0}'.format(len(self.weights)))
          if len(self.weights) == 0:
              self.weights.append(
                  lbann.Weights(initializer=lbann.HeNormalInitializer(),
                                name=self.name+'_matrix'))
          if len(self.weights) == 1:
              self.weights.append(
                  lbann.Weights(initializer=lbann.ConstantInitializer(value=0.0),
                                name=self.name+'_bias'))
  
          # Initialize activation layer
          self.activation = None
          if activation:
              if isinstance(activation, type):
                  self.activation = activation
              else:
                  self.activation = type(activation)
              if not issubclass(self.activation, lbann.Layer):
                  raise ValueError('activation must be a layer')
function_tokens: def __init__ ( self , size , bias = True , transpose = False , weights = [ ] , activation = None , name = None , data_layout = 'data_parallel' , parallel_strategy = { } ) : super ( ) . __init__ ( ) FullyConnectedModule . global_count += 1 self . instance = 0 self . size = size self . bias = bias self . transpose = transpose self . data_layout = data_layout self . parallel_strategy = parallel_strategy self . name = ( name if name else 'fcmodule{0}' . format ( FullyConnectedModule . global_count ) ) # Initialize weights # Note: If weights are not provided, matrix weights are # initialized with He normal scheme and bias weights are # initialized with zeros. self . weights = list ( make_iterable ( weights ) ) if len ( self . weights ) > 2 : raise ValueError ( '`FullyConnectedModule` has ' 'at most two weights, ' 'but got {0}' . format ( len ( self . weights ) ) ) if len ( self . weights ) == 0 : self . weights . append ( lbann . Weights ( initializer = lbann . HeNormalInitializer ( ) , name = self . name + '_matrix' ) ) if len ( self . weights ) == 1 : self . weights . append ( lbann . Weights ( initializer = lbann . ConstantInitializer ( value = 0.0 ) , name = self . name + '_bias' ) ) # Initialize activation layer self . activation = None if activation : if isinstance ( activation , type ) : self . activation = activation else : self . activation = type ( activation ) if not issubclass ( self . activation , lbann . Layer ) : raise ValueError ( 'activation must be a layer' )