Everytime when I tried to run the initialization code like in ResNet, the machine just said
Illegal Instruction
The code I tried to run is here:
for m in self.modules():
if isinstance(m, nn.Conv2d):
n = m.kernel_size[0] * m.kernel_size[1] * m.out_channels
m.weight.data.normal_(0, math.sqrt(2. / n))
elif isinstance(m, nn.BatchNorm2d):
m.weight.data.fill_(1)
m.bias.data.zero_()
The machine is a Linux server with Centos system. I don’t have the root privelige.
And, when I run torch.randn(2,2)
, it’s OK. But for torch.randn(4,4)
and bigger size, it also says illegal instruction.