bn.running_mean  and bn.running_var are tensors
so as the problem in this post:

  
    
    
    How to convert a keras layer to equivalent pytorch layer? 
  
  
    Hello there, 
May someone provide some codes to help me how can I convert keras convolution, batchnorm, leakyRelu and maxpooling layers to pytorch equivalent? Are there any differences between these layers in keras and pytorch? I have wrote some codes to do this but not sure about the correctness. 
I have a .h5 file which has the pretrained model in keras. What I want to do is to create a dictionary variable in python which is indexed by the layer name and has the definition of each layer in pyt…