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

torch.nn.ConvTranspose2d fails with constant output_size #1116

Open
elad-c opened this issue Jun 20, 2024 · 1 comment
Open

torch.nn.ConvTranspose2d fails with constant output_size #1116

elad-c opened this issue Jun 20, 2024 · 1 comment
Labels
bug Something isn't working no-issue-activity pytorch

Comments

@elad-c
Copy link
Collaborator

elad-c commented Jun 20, 2024

Issue Type

Bug

Source

source

MCT Version

nightly

OS Platform and Distribution

No response

Python version

No response

Describe the issue

MCT builds the quantized model incorrectly. The quantized model output shape is different between original and quantized models.

Expected behaviour

No response

Code to reproduce the issue

class Model(nn.Module):

    def __init__(self):
        super().__init__()
        self.downsample = nn.Conv2d(3, 16, 3, stride=2, padding=1)
        self.upsample = nn.ConvTranspose2d(16, 16, 3, stride=2, padding=1)

    def forward(self, x):
        return self.upsample(self.downsample(x), [8, 8])

# float model output shape: [B, 16, 8, 8]
# Quantized model output shape: [B, 16, 7, 7]

Log output

No response

@elad-c elad-c added bug Something isn't working pytorch labels Jun 20, 2024
Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity pytorch
Projects
None yet
Development

No branches or pull requests

1 participant