-
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
Fix prelu bug in pytorch frontend #8192
Conversation
Thanks @YuhengHuang42! Please fix the lint error by running |
Can you remove unrelated diffs in |
The latest version should be OK. I encountered some weird bugs when using black, so I tried to use different versions of black to see the result. Somehow I changed the code style and because of this too many modifications are made. So I did rollback. I think I have fixed this problem. I will wait to see if this version can be successfully built or not. |
thanks @YuhengHuang42 |
* Fix prelu bug in pytorch frontend * Fix lint error * fix lint error * Fix lint error * Try to fix lint error * Fix lint error Co-authored-by: huangyuheng <32429436+hyhzxhy@users.noreply.github.com>
* Fix prelu bug in pytorch frontend * Fix lint error * fix lint error * Fix lint error * Try to fix lint error * Fix lint error Co-authored-by: huangyuheng <32429436+hyhzxhy@users.noreply.github.com>
This PR tries to fix PReLU bug mentioned in #8184
Reference: https://pytorch.org/docs/stable/generated/torch.nn.PReLU.html#torch.nn.PReLU
In short, there are two situations we need to consider:
tvm.relay.nn.prelu
is set to 1, we will encounter an error when directly calling this function.@masahi Please take a look at this PR, thanks!