wavefrontshaping / complexPyTorch

A high-level toolbox for using complex valued neural networks in PyTorch
MIT License
610 stars 148 forks source link

ComplexPReLU Bug #37

Closed Elapsedf closed 2 months ago

Elapsedf commented 2 months ago

in the complexLayer.py, there is something wrong class ComplexPReLU(Module): def init(self): super().init() self.r_prelu = PReLU()
self.i_prelu = PReLU()

@staticmethod
def forward(self, inp):
    return self.r_prelu(inp.real) + 1j*self.i_prelu(inp.imag)

you need to decline the @staticmethod so that the ComplexPReLU would not report the bug