xxradon / PytorchToCaffe

Pytorch model to caffe model, supported pytorch 0.3, 0.3.1, 0.4, 0.4.1 ,1.0 , 1.0.1 , 1.2 ,1.3 .notice that only pytorch 1.1 have some bugs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to include (-1,1) data normalization into caffe model definition?

srinadhu opened this issue · comments

Hello all,

This is all while for inference. The mean and std are the imagenet values (3 channels). The mean normalization is performed using transform_param. The scale seems to take only 1 value instead of 3 values, is there a workaround for scale taking 3 values? One idea was to divide the weights of the first convolution by the 3 values one per channel dimension (3X3X3) but I am not able to figure out how to do this? Thought someone would have already faced the same issue and had some workaround.

Thanks and Regards,
Srinadh.