未验证 提交 dddaf7f4 编写于 作者: J Jason 提交者: GitHub

Merge pull request #499 from SunAhong1993/develop

fix the onnx conv
......@@ -1738,7 +1738,6 @@ class OpSet9():
_rename_or_remove_weight(self.weights, val_b.name, op_name+'.bias', remove_bias)
else:
layer_attrs["bias_attr"] = False
input_shape = val_x.out_shapes[0]
if reduce(lambda x,y:x*y, input_shape) in [1, -1] and 1 not in input_shape:
input_shape[1] = num_in_channels * num_groups
input_shape[0] = 0
......
......@@ -1627,12 +1627,11 @@ class OpSet9():
"groups": num_groups,
}
layer_inputs = {
"x": val_x.name,
"x": val_x if isinstance(val_x, str) else val_x.name,
"weight": val_w.name
}
if has_bias:
layer_inputs["bias"] = val_b.name
input_shape = val_x.out_shapes[0]
if reduce(lambda x,y:x*y, input_shape) in [1, -1] and 1 not in input_shape:
input_shape[1] = num_in_channels * num_groups
input_shape[0] = 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册