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

fixed for ci

上级 dbcc4203
......@@ -84,7 +84,7 @@ class ONNXOpMapper():
else:
break
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 {}.'
.format(self.support_op_sets, decoder.op_set))
return eval(opset)(decoder, self.paddle_graph)
......@@ -28,7 +28,7 @@ import copy
import sys
import shutil
_logger = _logging.getLogger(__name__)
_logger = _logging.getLogger()
def _const_weight_or_none(node, necessary=False):
......@@ -2203,8 +2203,12 @@ class OpSet():
paddings = np.array(pads).reshape((2, -1)).transpose().astype("int32")
paddings = paddings.flatten().tolist()
if auto_pad == "SAME_UPPER" or auto_pad == "SAME_LOWER":
assert -1 not in input_shape, 'SAME_UPPER and SAME_LOWER does not yet support dynamic shapes'
if auto_pad in ["SAME_UPPER", "SAME_LOWER"]:
# 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],
strides[0], auto_pad)
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.
先完成此消息的编辑!
想要评论请 注册