caffe2_cpp_tutorial
                                
                                 caffe2_cpp_tutorial copied to clipboard
                                
                                    caffe2_cpp_tutorial copied to clipboard
                            
                            
                            
                        Batch normalization
I'm reading the example provided here, trying to adapt what I read to another net: https://github.com/leonardvandriel/caffe2_cpp_tutorial/blob/master/include/caffe2/zoo/resnet.h
I just wanted to know, when doing a batch normalization, I see that you are adding some inputs: predict.AddInput(p + "_s"); predict.AddInput(p + "_b"); predict.AddInput(p + "_rm"); predict.AddInput(p + "_riv");
I guess those are the scale, bias, mean and variance values of the input layer of the BN. My question is: are those holders linked/computed by caffe2 or shall I link them / compute them in some way? I'm not sure why we need to add inputs.
Hi, these parameters are trained by the SpatialBN operator provided bool train is set to true, and should not require any intervention from your side.