From 8e81c64e50130f7923306d8a44e5d73ea470694d Mon Sep 17 00:00:00 2001 From: Vandana Kannan Date: Mon, 17 Dec 2018 16:02:07 -0800 Subject: [PATCH] LogSoftMax export: Check temperature --- python/mxnet/contrib/onnx/mx2onnx/_op_translations.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py b/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py index 65012319eca1..d7aefa654648 100644 --- a/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py +++ b/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py @@ -1665,7 +1665,10 @@ def convert_logsoftmax(node, **kwargs): name, input_nodes, attrs = get_inputs(node, kwargs) # Converting to int - axis = int(attrs.get("axis", 1)) + axis = int(attrs.get("axis", -1)) + temp = attrs.get("temperature", 'None') + if temp != 'None': + raise AttributeError("ONNX supports only temperature=None") node = onnx.helper.make_node( 'LogSoftmax',