Hi all,
While I’m trying to use the instance_norm function in the functional class with my own weight and bias, it raises some errors like below,
Traceback (most recent call last):
File “learn_train.py”, line 320, in 
pred_v = model([inputParaTensor_v, inputTensor_v])
File “/root/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 357, in call
result = self.forward(*input, **kwargs)
File “/root/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py”, line 71, in forward
return self.module(*inputs[0], **kwargs[0])
File “/root/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 357, in call
result = self.forward(*input, **kwargs)
File “learn_train.py”, line 90, in forward
conv1_feat = self.relu(F.layer_norm(conv1_feat_norm))
AttributeError: module ‘torch.nn.functional’ has no attribute ‘layer_norm’
The code snippet is very simple,
conv1_feat_norm = F.conv2d(x_img, self.conv1_weight, bias=None, padding=1)
conv1_feat = self.relu(F.layer_norm(conv1_feat_norm))
Does anyone have any idea why this happens?
Best