diff --git a/ppdet/modeling/architectures/meta_arch.py b/ppdet/modeling/architectures/meta_arch.py index d01c34735653050c7b78799f06cbf72b85979a61..1f13c854072956395e8bb9bbb5b9ad9d43d2eeec 100644 --- a/ppdet/modeling/architectures/meta_arch.py +++ b/ppdet/modeling/architectures/meta_arch.py @@ -63,10 +63,15 @@ class BaseArch(nn.Layer): inputs_list.append(inputs) else: inputs_list.extend(inputs) - outs = [] 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()) # multi-scale test