-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Frontend][Relay] Keras softmax and prelu fix under NHWC #6278
Conversation
@kazum please also help to manage the PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good to me, thanks for the fix!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@domin1985 The change looks good. Could you rebase against the master to trigger the CI? |
* prelu and softmax with NHWC layout consideration * fix lint * fix lint
Thanks @domin1985 @leandron @jwfromm @yongwww ! |
) * prelu and softmax with NHWC layout consideration * fix lint * fix lint Co-authored-by: Dongming Yang <[email protected]>
) * prelu and softmax with NHWC layout consideration * fix lint * fix lint Co-authored-by: Dongming Yang <[email protected]>
) * prelu and softmax with NHWC layout consideration * fix lint * fix lint Co-authored-by: Dongming Yang <[email protected]>
) * prelu and softmax with NHWC layout consideration * fix lint * fix lint Co-authored-by: Dongming Yang <[email protected]>
) * prelu and softmax with NHWC layout consideration * fix lint * fix lint Co-authored-by: Dongming Yang <[email protected]>
Hi,
Tvm error occurred when I imported a pre-trained keras model with NHWC layout:
TVMError:
Error(s) have occurred. The program has been annotated with them:
In main:
%0 = negative(%v_param_3);
%1 = nn.conv2d(%input_1, %v_param_1, padding=[4, 4], channels=64, kernel_size=[9, 9], data_layout="NHWC", kernel_layout="HWIO");
%2 = nn.bias_add(%1, %v_param_2, axis=-1);
%3 = negative(%2);
%4 = nn.relu(%3);
%5 = multiply(%0, %4) Incompatible broadcast type TensorType([64, 1, 1], float32) and TensorType([1, (int64)96, (int64)96, 64], float32); ;
%6 = nn.relu(%2);
softmax and prelu convertion should take layout into consideration.
@siju-samuel @yongwww @jwfromm