提交 47066a34 编写于 作者: W wjj19950828

fixed for ci

上级 dbcc4203
...@@ -84,7 +84,7 @@ class ONNXOpMapper(): ...@@ -84,7 +84,7 @@ class ONNXOpMapper():
else: else:
break break
opset = 'OpSet' + str(run_op_set) opset = 'OpSet' + str(run_op_set)
print('Now, onnx2paddle support convert onnx model opset_verison {},' print('Now, onnx2paddle support convert onnx model opset_verison {}, '
'opset_verison of your onnx model is {}.' 'opset_verison of your onnx model is {}.'
.format(self.support_op_sets, decoder.op_set)) .format(self.support_op_sets, decoder.op_set))
return eval(opset)(decoder, self.paddle_graph) return eval(opset)(decoder, self.paddle_graph)
...@@ -28,7 +28,7 @@ import copy ...@@ -28,7 +28,7 @@ import copy
import sys import sys
import shutil import shutil
_logger = _logging.getLogger(__name__) _logger = _logging.getLogger()
def _const_weight_or_none(node, necessary=False): def _const_weight_or_none(node, necessary=False):
...@@ -2203,8 +2203,12 @@ class OpSet(): ...@@ -2203,8 +2203,12 @@ class OpSet():
paddings = np.array(pads).reshape((2, -1)).transpose().astype("int32") paddings = np.array(pads).reshape((2, -1)).transpose().astype("int32")
paddings = paddings.flatten().tolist() paddings = paddings.flatten().tolist()
if auto_pad == "SAME_UPPER" or auto_pad == "SAME_LOWER": if auto_pad in ["SAME_UPPER", "SAME_LOWER"]:
assert -1 not in input_shape, 'SAME_UPPER and SAME_LOWER does not yet support dynamic shapes' # Warning: SAME_UPPER and SAME_LOWER does not yet support dynamic shapes
if input_shape[2] == -1 or input_shape[3] == -1:
_logger.warning(
'SAME_UPPER and SAME_LOWER does not yet support dynamic shapes, the conversion result may have a diff!!!'
)
pad_h = _get_same_padding(input_shape[2], kernel_shape[0], pad_h = _get_same_padding(input_shape[2], kernel_shape[0],
strides[0], auto_pad) strides[0], auto_pad)
pad_w = _get_same_padding(input_shape[3], kernel_shape[1], pad_w = _get_same_padding(input_shape[3], kernel_shape[1],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册