class_docstr: Applies a linear transformation to the incoming data: :math:`y = xA^T + b`
  
  Wraps torch.nn.Linear to support AMP + torchscript usage by manually casting
  weight & bias to input.dtype to work around an issue w/ torch.addmm in this use case.
class_docstr_tok: ["Applies","a","linear","transformation","to","the","incoming","data",":",":","math",":","`","y","=","xA^T","+","b","`","Wraps","torch.nn.Linear","to","support","AMP","+","torchscript","usage","by","manually","casting","weight","&","bias","to","input.dtype","to","work","around","an","issue","w\/","torch.addmm","in","this","use","case","."]
code: def forward(self, input: torch.Tensor) -> torch.Tensor:
      if torch.jit.is_scripting():
          bias = (
              self.bias.to(dtype=input.dtype)
              if self.bias is not None
              else None
          )
          return F.linear(
              input, self.weight.to(dtype=input.dtype), bias=bias
          )
      else:
          return F.linear(input, self.weight, self.bias)
  
imports: import torch
  import torch.nn.functional
  from torch import nn
label_desc: Use image node_id 1 for calling the Linear obj's underlying member method code with example usage: obj.forward(input) and returns: F, F