Solved by albanD in post #2 
              
              
                Hi, 
This is because the batchnorm can be created without the affine transformation (see the code here). In that case, the weight and bias will be None. 
For the linear layer, the .bias can be None for the same reason. 
For the weight_v attribute. I guess this is something that the user added himsel…