提交 2d1b38ee 编写于 作者: C Channingss

upsample bug fix

上级 130a48cd
......@@ -339,7 +339,11 @@ class OpSet9():
inputs['out_shape'] = var_hw
elif node.layer_type == 'Upsample':
val_scales = self.graph.get_input_node(node, idx=1, copy=True)
inputs['scale'] = val_scales
value = _const_weight_or_none(val_scales)
if value is not None and value[-1] == value[-2]:
inputs['scale'] = value.tolist()[-1]
else:
inputs['scale'] = val_scales
attr = {'name': string(node.layer_name)}
mode = node.get_attr('mode', 'nearest')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册