code: def __init__(
      self, weight_shape=None, dtype=torch.half, weight=None, bias=None
  ):
      super(LinearLayer, self).__init__()
      if weight is not None:
          self.weight = weight
          self.bias = bias
      else:
          self.weight = Parameter(
              torch.empty(
                  weight_shape,
                  dtype=dtype,
                  device=torch.cuda.current_device(),
              )
          )
  
          self.bias = (
              Parameter(
                  torch.empty(
                      weight_shape[0],
                      dtype=dtype,
                      device=torch.cuda.current_device(),
                  )
              )
              if bias is not None
              else None
          )
  
imports: import torch
  from deepspeed import comm
  from torch import nn
  from torch.nn import functional
  from torch.nn.parameter import Parameter
label_desc: Use image node_id 1 to create a new LinearLayer object from inherited base classes: nn with example: obj = LinearLayer(weight_shape, dtype, weight, bias)