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

Pretrained model does not match the model definition #1

Open
nisha1729 opened this issue Jul 26, 2021 · 4 comments
Open

Pretrained model does not match the model definition #1

nisha1729 opened this issue Jul 26, 2021 · 4 comments

Comments

@nisha1729
Copy link

nisha1729 commented Jul 26, 2021

The pre-trained model weights could not be loaded to the current model definition. I changed the model to

self.encoder = nn.Sequential(
            nn.Conv2d(3, 32, 4, stride=2, padding=1),            # [batch, 12, 16, 16]
            nn.ReLU(),
            nn.Conv2d(32, 48, 3, stride=2, padding=1),           # [batch, 24, 8, 8]
            nn.ReLU(),
        )
        self.decoder = nn.Sequential(
		    nn.ConvTranspose2d(48, 32, 3, stride=2, padding=1),  # [batch, 24, 8, 8]
            nn.ReLU(),
			nn.ConvTranspose2d(32, 3, 4, stride=2, padding=1),   # [batch, 12, 16, 16]
            nn.ReLU(),
        )

Now the code works, but the reconstruction is quite bad.
image

Do you have a different pre-trained model that can be used? Thanks!

@ColdAsYou165
Copy link

I have the same question too!It seems that the author didn't provides the right weights?

@ColdAsYou165
Copy link

Have you solved the problem yet

@nisha1729
Copy link
Author

I just retrained the model 😅

@Wsine
Copy link

Wsine commented Sep 13, 2022

I got the same problem

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

3 participants