andyzeng / arc-robot-vision

MIT-Princeton Vision Toolbox for Robotic Pick-and-Place at the Amazon Robotics Challenge 2017 - Robotic Grasping and One-shot Recognition of Novel Objects with Deep Learning.
http://arc.cs.princeton.edu
Apache License 2.0
295 stars 97 forks source link

Question about delete BN #8

Closed baoyufuyou closed 5 years ago

baoyufuyou commented 5 years ago

Hallo Zeng, Can I ask a question about deleting BN. Why do you want to delete all of BN of pre-trained Resnet and transform into spatialconstdiagnal? And whats inn package? Is inn.ConstAffine like https://github.com/szagoruyko/imagine-nn/blob/master/ConstAffine.lua? and what have been done in innutils.BNtoFixed? I have't used torch, so i have so many question. Thanks a lot and Happy Easter!


````-- (with inn routines)
````local inn = require 'inn'
````local innutils = require 'inn.utils'
````if not nn.SpatialConstDiagonal then
````  torch.class('nn.SpatialConstDiagonal', 'inn.ConstAffine')
````end
````utils.BNtoFixed = innutils.BNtoFixed
wenjie23 commented 4 years ago

I am also wondering the purpose of 'Remove BN'?

If I understand the lua code correctly, why the running_mean and running_var are also freezed?