Convert bactchnorm weights from caffe to pytorch

I am trying to convert caffemodel weights to pytorch and i am wondering what is num_batches_tracked in pytorch that is similar to caffe.
Here is my caffe BN prototxt

layer {
  name: "conv5_3_1x1_increase/bn"
  type: "BatchNorm"
  bottom: "conv5_3_1x1_increase"
  top: "conv5_3_1x1_increase"
  batch_norm_param {
    use_global_stats: true
layer {
  name: "conv5_3_1x1_increase/bn/scale"
  type: "Scale"
  bottom: "conv5_3_1x1_increase"
  top: "conv5_3_1x1_increase"
  scale_param {
    bias_term: true

I can convert caffemodel like this

for layer_name, param in caffe_model.items():
    if '/bn' in layer_name and '/scale' not in layer_name:
        factor = param[2].data[0]
        mean = np.array(param[0].data, dtype=np.float32) / factor
        variance = np.array(param[1].data, dtype=np.float32) / factor
    if '/scale' in layer_name:
        gamma = np.array(param[0].data, dtype=np.float32)
        beta = np.array(param[1].data, dtype=np.float32)
        params[layer_name + '.weight'] = gamma
        params[layer_name + '.bias'] = beta
        params[layer_name + '.running_mean'] = mean
        params[layer_name + '.running_var'] = variance

but pytorch has a variable called num_batches_tracked and how do i find this in caffe model. ?

I don’t think it’s in the caffe2 model. You probably don’t need it. It’s only used when computing running_mean/var with a simple moving average. By default we use an exponential moving average.

Interesting! Could you share to me know do you copy weight of convolution and concat layer in caffe to pytorch? I am working on it also. Thanks