class_docstr: A torch.nn.Linear wrapper that declares input and output shapes, and enables the customization of:
  
  1. how weights and biases are initialized
  2. normalization (layer and batch)
  3. activations
  4. dropout
class_docstr_tok: ["A","torch.nn.Linear","wrapper","that","declares","input","and","output","shapes",",","and","enables","the","customization","of",":","1.","how","weights","and","biases","are","initialized","2.","normalization","(","layer","and","batch",")","3.","activations","4.","dropout"]
code: def __init__(
      self,
      input_size: int,
      input_rank: int = 2,
      output_size: int = 256,
      use_bias: bool = True,
      weights_initializer: str = "xavier_uniform",
      bias_initializer: str = "zeros",
      norm: Optional[str] = None,
      norm_params: Optional[Dict] = None,
      activation: str = "relu",
      dropout: float = 0,
  ):
      super().__init__()
  
      self.layers = ModuleList()
      self.input_size = input_size
      self.output_size = output_size
  
      fc = Linear(
          in_features=input_size,
          out_features=output_size,
          bias=use_bias,
      )
      self.layers.append(fc)
  
      weights_initializer = initializer_registry[weights_initializer]
      weights_initializer(fc.weight)
  
      if use_bias:
          bias_initializer = initializer_registry[bias_initializer]
          bias_initializer(fc.bias)
  
      if norm is not None:
          norm_params = norm_params or {}
          self.layers.append(
              create_norm_layer(
                  norm, input_rank, output_size, **norm_params
              )
          )
  
      # Dict for activation objects in pytorch?
      self.layers.append(activations[activation]())
  
      if dropout > 0:
          self.layers.append(Dropout(dropout))
  
imports: import logging
  from copy import deepcopy
  from typing import Dict, List, Optional
  import torch
  from torch.nn import Dropout, Linear, ModuleList
  from ludwig.modules.normalization_modules import create_norm_layer
  from ludwig.utils.torch_utils import activations, initializer_registry, LudwigModule
label_desc: Use image node_id 1 to create a new FCLayer object from inherited base classes: LudwigModule with example: obj = FCLayer(input_size, input_rank, output_size, use_bias, weights_initializer, bias_initializer, norm, norm_params, activation, dropout)