Skip to content
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

[PYTORCH] pytorch frontend expand op bug #5575

Closed
Xuxue1 opened this issue May 12, 2020 · 1 comment
Closed

[PYTORCH] pytorch frontend expand op bug #5575

Xuxue1 opened this issue May 12, 2020 · 1 comment

Comments

@Xuxue1
Copy link
Contributor

Xuxue1 commented May 12, 2020

In pytorch frontend testcase modify input_shape and expand shape

def test_forward_expand():
    torch.set_grad_enabled(False)
    input_shape = [3, 1]

    class Expand1(Module):
        def forward(self, *args):
            return args[0].expand((3, 3, 3, 1))

    input_data = torch.rand(input_shape).float()
    verify_model(Expand1().float().eval(), input_data=input_data)

Traceback (most recent call last):

File "tests/python/frontend/pytorch/test_forward.py", line 2109, in
test_forward_expand()

File "tests/python/frontend/pytorch/test_forward.py", line 912, in test_forward_expand
verify_model(Expand1().float().eval(), input_data=input_data)

File "tests/python/frontend/pytorch/test_forward.py", line 191, in verify_model
assert_shapes_match(baseline_output, compiled_output)

File "tests/python/frontend/pytorch/test_forward.py", line 39, in assert_shapes_match
raise AssertionError(msg.format(tru.shape, est.shape))

AssertionError: Output shapes (3, 3, 3, 1) and (3, 3) don't match

@masahi
Copy link
Member

masahi commented May 13, 2020

Fixed by #5576

@masahi masahi closed this as completed May 13, 2020
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

No branches or pull requests

2 participants