class_docstr: A potentially complex-valued linear layer. Reduces to a regular linear
  layer if `complex_valued=False`.
class_docstr_tok: ["A","potentially","complex-valued","linear","layer",".","Reduces","to","a","regular","linear","layer","if","`","complex_valued=False","`","."]
code: def forward(self, x):
      if self.complex_valued:
          return (self.re(x.real) - self.im(x.imag)) + 1j * (
              self.re(x.imag) + self.im(x.real)
          )
      else:
          return self.lin(x)
  
imports: import functools
  from functools import partial
  import numpy
  import torch
  from torch import Tensor, nn
  from torch.nn.modules.batchnorm import _BatchNorm
label_desc: Use image node_id 2 for calling the ComplexLinear obj's underlying member method code with example usage: obj.forward(x) and returns: unknown, self