domin1985 commented on a change in pull request #6278:
URL: https://github.com/apache/incubator-tvm/pull/6278#discussion_r470529801
##########
File path: python/tvm/relay/frontend/keras.py
##########
@@ -123,10 +124,11 @@ def _convert_advanced_activation(inexpr, keras_layer,
etab):
if isinstance(axis, list):
raise tvm.error.OpAttributeUnImplemented(
'Softmax with axes {} is not supported.'.format(axis))
- if axis == -1:
- axis = 1
- else:
- axis = axis + 1 if axis < dims - 1 else 1
+ if etab.data_layout == 'NCHW':
Review comment:
TVM Keras frontend supports tensorflow backend only and the data_format
attribute is channel_last (aka NHWC or NDHWC). So when the target layout is set
NCHW (as default), the axis value should be transformed to be consist with the
target layout.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]