未验证 提交 a794cacc 编写于 作者: J JYChen 提交者: GitHub

fix fuse_normalize not working when export model (#5106)

* fix fuse_normalize not working when export model

* fix solov2 by keeping inputs setting before building model
上级 df55cb9b
...@@ -63,10 +63,15 @@ class BaseArch(nn.Layer): ...@@ -63,10 +63,15 @@ class BaseArch(nn.Layer):
inputs_list.append(inputs) inputs_list.append(inputs)
else: else:
inputs_list.extend(inputs) inputs_list.extend(inputs)
outs = [] outs = []
for inp in inputs_list: for inp in inputs_list:
self.inputs = inp if self.fuse_norm:
self.inputs['image'] = (
inp['image'] * self.scale - self.mean) / self.std
self.inputs['im_shape'] = inp['im_shape']
self.inputs['scale_factor'] = inp['scale_factor']
else:
self.inputs = inp
outs.append(self.get_pred()) outs.append(self.get_pred())
# multi-scale test # multi-scale test
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册