| 10 | pass |
| 11 | |
| 12 | class cPReLU(nn.Module): |
| 13 | |
| 14 | def __init__(self, complex_axis=1): |
| 15 | super(cPReLU,self).__init__() |
| 16 | self.r_prelu = nn.PReLU() |
| 17 | self.i_prelu = nn.PReLU() |
| 18 | self.complex_axis = complex_axis |
| 19 | |
| 20 | |
| 21 | def forward(self, inputs): |
| 22 | real, imag = torch.chunk(inputs, 2,self.complex_axis) |
| 23 | real = self.r_prelu(real) |
| 24 | imag = self.i_prelu(imag) |
| 25 | return torch.cat([real,imag],self.complex_axis) |
| 26 | |
| 27 | class NavieComplexLSTM(nn.Module): |
| 28 | def __init__(self, input_size, hidden_size, projection_dim=None, bidirectional=False, batch_first=False): |
nothing calls this directly
no outgoing calls
no test coverage detected