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 forward(self, x):
      num_axis = len(
          x.shape[2:]
      )  # num_axis in L, for broadcasting bias
      y = contract(
          "b u ..., v u -> b v ...", x, self.weight
      ) + self.bias.view(-1, *[1] * num_axis)
      return y
  
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 2 for calling the TransposedLinear obj's underlying member method code with example usage: obj.forward(x) and returns: y