class_docstr: Linear layer.
  
  Args:
      in_features (int): size of each input sample.
      out_features (int): size of each output sample.
      bias (bool, optional): If set to ``False``, the layer will not learn an additive bias, defaults to ``True``.
      dtype (:class:`torch.dtype`, optional): The dtype of parameters, defaults to None.
      skip_bias_add: bool (optional, default to be false).
      weight_initializer (:class:`typing.Callable`, optional):
          The initializer of weight, defaults to kaiming uniform initializer.
      bias_initializer (:class:`typing.Callable`, optional):
          The initializer of bias, defaults to xavier uniform initializer.
  
  More details about ``initializer`` please refer to
  `init <https://github.com/hpcaitech/ColossalAI/blob/main/colossalai/nn/init.py>`_.
class_docstr_tok: ["Linear","layer",".","Args",":","in_features","(","int",")",":","size","of","each","input","sample",".","out_features","(","int",")",":","size","of","each","output","sample",".","bias","(","bool",",","optional",")",":","If","set","to","``","False","``",",","the","layer","will","not","learn","an","additive","bias",",","defaults","to","``","True","``",".","dtype","(",":","class",":","`","torch.dtype","`",",","optional",")",":","The","dtype","of","parameters",",","defaults","to","None",".","skip_bias_add",":","bool","(","optional",",","default","to","be","false",")",".","weight_initializer","(",":","class",":","`","typing.Callable","`",",","optional",")",":","The","initializer","of","weight",",","defaults","to","kaiming","uniform","initializer",".","bias_initializer","(",":","class",":","`","typing.Callable","`",",","optional",")",":","The","initializer","of","bias",",","defaults","to","xavier","uniform","initializer",".","More","details","about","``","initializer","``","please","refer","to","`","init","<","https",":","\/\/github.com\/hpcaitech\/ColossalAI\/blob\/main\/colossalai\/nn\/init.py",">","`","_","."]
code: def __init__(
      self,
      in_features: int,
      out_features: int,
      bias: bool = True,
      dtype: torch.dtype = None,
      skip_bias_add: bool = False,
      weight_initializer: Callable = init.kaiming_uniform_(
          a=math.sqrt(5)
      ),
      bias_initializer: Callable = init.xavier_uniform_(a=1, scale=1),
      **kwargs,
  ) -> None:
      super().__init__()
      self.in_features = in_features
      self.out_features = out_features
      self.skip_bias_add = skip_bias_add
      factory_kwargs = {"device": get_current_device(), "dtype": dtype}
      self.weight = Parameter(
          torch.empty(
              self.out_features, self.in_features, **factory_kwargs
          )
      )
      if bias:
          self.bias = Parameter(
              torch.empty(self.out_features, **factory_kwargs)
          )
      else:
          self.bias = None
      weight_initializer(
          self.weight, fan_in=in_features, fan_out=out_features
      )
      if self.bias is not None:
          bias_initializer(self.bias, fan_in=in_features)
  
imports: import math
  from typing import Callable
  import torch
  import torch.nn.functional
  from torch import Tensor
  from torch import nn
  from torch.nn.parameter import Parameter
  from colossalai.legacy.context import seed
  from colossalai.legacy.registry import LAYERS
  from colossalai.nn import init
  from colossalai.utils.device import get_current_device
  from ..utils import to_2tuple
label_desc: Use image node_id 1 to create a new VanillaLinear object from inherited base classes: nn with example: obj = VanillaLinear(in_features, out_features, bias, dtype, skip_bias_add, weight_initializer, bias_initializer)