class_docstr: Transposed linear module.
  
  Linear module on the second-to-last dimension
  Assumes shape (B, D, L), where L can be 1 or more axis
code: def __init__(self, d_input, d_output, bias=True):
      super().__init__()
  
      self.weight = nn.Parameter(torch.empty(d_output, d_input))
      nn.init.kaiming_uniform_(
          self.weight, a=math.sqrt(5)
      )  # nn.Linear default init
      # nn.init.kaiming_uniform_(
      #   self.weight, nonlinearity='linear') # should be equivalent
  
      if bias:
          self.bias = nn.Parameter(torch.empty(d_output))
          bound = 1 / math.sqrt(d_input)
          nn.init.uniform_(self.bias, -bound, bound)
          setattr(self.bias, "_optim", {"weight_decay": 0.0})
      else:
          self.bias = 0.0
  
imports: import math
  from functools import partial
  import torch
  import torch.nn
  import torch.nn.functional
  from einops import rearrange
  from opt_einsum import contract
label_desc: Use image node_id 1 to create a new TransposedLinear object from inherited base classes: nn with example: obj = TransposedLinear(d_input, d_output, bias)