Commit 0166e4a5 authored by Yuxin Wu's avatar Yuxin Wu

handle iter number in caffe bn

parent 6f3f985a
...@@ -72,9 +72,9 @@ class CaffeLayerProcessor(object): ...@@ -72,9 +72,9 @@ class CaffeLayerProcessor(object):
name + '/b': param[1].data} name + '/b': param[1].data}
def proc_bn(self, idx, name, param): def proc_bn(self, idx, name, param):
assert param[2].data[0] == 1.0 scale_factor = param[2].data[0]
return {name + '/mean/EMA': param[0].data, return {name + '/mean/EMA': param[0].data / scale_factor,
name + '/variance/EMA': param[1].data} name + '/variance/EMA': param[1].data / scale_factor}
def proc_scale(self, idx, name, param): def proc_scale(self, idx, name, param):
bottom_name = self.net.bottom_names[name][0] bottom_name = self.net.bottom_names[name][0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment