Closed zrion closed 2 years ago
Hi,
I added the use ComplexBatchNorm1d
in the Example.ipynb, it seems to work fine.
I corrected a bug two weeks ago, are you sure you have the last version?
Also, if you want better help, you should provide a minimal version of the code that causes the error. If you have the last version, this error probably means that the shape of your tensor is not right for a 1d batch norm, but again, difficult to say more without the code.
Hi,
Thanks for the response. I just installed the library two days ago via pip
. Does it reflect the latest version?
The CNN architecture I'm using:
class CNN(nn.Module):
def __init__(self):
super(CNN, self).__init__()
self.conv1 = ComplexConv2d(2, 256, (1,1))
self.bn = ComplexBatchNorm2d(256)
self.ln = ComplexLinear(256*128, 512)
self.bn1d = ComplexBatchNorm1d(512)
self.out = ComplexLinear(512, 1)
def forward(self, x):
x = self.conv1(x)
x = complex_relu(x)
x = self.bn(x)
x = x.view(-1, 256*128)
x = self.ln(x)
x = complex_relu(x)
x = self.bn1d(x)
x = self.out(x)
x = x.abs()
x = F.tanh(x)*1.02
return x
The input tensor is of size (-1, 2, 1, 128). This worked fine with numerical-valued data (with nn.BatchNorm1d()
).
I did not update the release on PyPi before, but I just did (version 0.4).
Update the package with pip
and tell me if it works.
Hi,
Thanks for the great work. I'm having a problem with ComplexBatchNorm1d layer when doing forward propagation. After passing a tensor of size [-1, 128] to this layer, this returned an error:
I'm not sure how to interpret this error, and what would cause it to happen. Can you help? Thanks!