Skip to content

Conversation

@soodoshll
Copy link
Contributor

@soodoshll soodoshll commented Oct 6, 2021

Greetings. I encountered a problem when trying translating Pytorch models into relay. relay.nn.bias_add has a default axis=1, which is inconsistent with linear in PyTorch (when ndim>2), which always adds bias to the last dimension. So it is necessary to explicitly assign axis=-1 here.

Thanks @spectrometerHBH for helping debug. cc @junrushao1994

@masahi
Copy link
Member

masahi commented Oct 6, 2021

Thanks, can you add a test?

Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the bugfix!

@soodoshll
Copy link
Contributor Author

@masahi Hi, test is also fixed.

@masahi masahi merged commit 26c3510 into apache:main Oct 7, 2021
@masahi
Copy link
Member

masahi commented Oct 7, 2021

Thanks @soodoshll

ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants