diff --git a/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py b/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py index eb50f94746d0..3baf10a10d39 100644 --- a/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py +++ b/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py @@ -810,7 +810,7 @@ def convert_l2normalization(node, **kwargs): mode = attrs.get("mode", "instance") if mode != "channel": - raise AttributeError("ONNX currently supports channel mode only") + raise AttributeError("L2Normalization: ONNX currently supports channel mode only") l2norm_node = onnx.helper.make_node( "LpNormalization", @@ -1302,7 +1302,7 @@ def convert_reshape(node, **kwargs): for val in output_shape_list: if val in not_supported_shape: - raise AttributeError("Shape value not supported in ONNX", val) + raise AttributeError("Reshape: Shape value not supported in ONNX", val) reshape_node = onnx.helper.make_node( "Reshape", @@ -1428,7 +1428,7 @@ def convert_squeeze(node, **kwargs): axis = attrs.get("axis", None) if not axis: - raise AttributeError("Missing axis attribute: ONNX currently requires axis to " + raise AttributeError("Squeeze: Missing axis attribute: ONNX currently requires axis to " "be specified for squeeze operator") axis = convert_string_to_list(axis) @@ -1679,7 +1679,7 @@ def convert_logsoftmax(node, **kwargs): axis = int(attrs.get("axis", -1)) temp = attrs.get("temperature", 'None') if temp != 'None': - raise AttributeError("ONNX supports only temperature=None") + raise AttributeError("LogSoftMax: ONNX supports only temperature=None") node = onnx.helper.make_node( 'LogSoftmax',