class_docstr: Simple PyTorch version of `linear` function
class_docstr_tok: ["Simple","PyTorch","version","of","`","linear","`","function"]
docstr: Creates a standard FC layer, similar to torch.nn.Linear
  
  Args:
      in_size: Input size for FC Layer
      out_size: Output size for FC Layer
      initializer: Initializer function for FC layer weights
      activation_fn: Activation function at the end of layer
      use_bias: Whether to add bias weights or not
      bias_init: Initalize bias weights to bias_init const
docstr_tok: ["Creates","a","standard","FC","layer",",","similar","to","torch.nn.Linear","Args",":","in_size",":","Input","size","for","FC","Layer","out_size",":","Output","size","for","FC","Layer","initializer",":","Initializer","function","for","FC","layer","weights","activation_fn",":","Activation","function","at","the","end","of","layer","use_bias",":","Whether","to","add","bias","weights","or","not","bias_init",":","Initalize","bias","weights","to","bias_init","const"]
code: def __init__(
      self,
      in_size: int,
      out_size: int,
      initializer: Any = None,
      activation_fn: Any = None,
      use_bias: bool = True,
      bias_init: float = 0.0,
  ):
      """Creates a standard FC layer, similar to torch.nn.Linear
  
      Args:
          in_size: Input size for FC Layer
          out_size: Output size for FC Layer
          initializer: Initializer function for FC layer weights
          activation_fn: Activation function at the end of layer
          use_bias: Whether to add bias weights or not
          bias_init: Initalize bias weights to bias_init const
      """
      super(SlimFC, self).__init__()
      layers = []
      # Actual nn.Linear layer (including correct initialization logic).
      linear = nn.Linear(in_size, out_size, bias=use_bias)
      if initializer is None:
          initializer = nn.init.xavier_uniform_
      initializer(linear.weight)
      if use_bias is True:
          nn.init.constant_(linear.bias, bias_init)
      layers.append(linear)
      # Activation function (if any; default=None (linear)).
      if isinstance(activation_fn, str):
          activation_fn = get_activation_fn(activation_fn, "torch")
      if activation_fn is not None:
          layers.append(activation_fn())
      # Put everything in sequence.
      self._model = nn.Sequential(*layers)
  
imports: import numpy
  from typing import Union, Tuple, Any, List
  from ray.rllib.models.utils import get_activation_fn
  from ray.rllib.utils.annotations import DeveloperAPI
  from ray.rllib.utils.framework import try_import_torch
  from ray.rllib.utils.typing import TensorType
label_desc: Use image node_id 1 to create a new SlimFC object from inherited base classes: nn with example: obj = SlimFC(in_size, out_size, initializer, activation_fn, use_bias, bias_init)