-
Notifications
You must be signed in to change notification settings - Fork 164
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
Customize models for different image sizes #91
Comments
Thank you for your interest in the library. I am happy to see that it is useful for your research. Just so I better understand what you did to make this work for the VAE, Did you pass your own encoder and decoder to the model? Or only rely on the networks built automatically? For the Best, Clément |
Due to the input difference, in my case 128x128 and yours 28x28 (I followed the mnist example), I looked for the encoders and decoders in your library and I modified some layers so that the autoencoder was prepared for my input. For VAE it worked fine, however for the RAE-L2 and VAEGAN it didn't.
the decoder:
and the RAE-L2, that is exactly like yours:
and this was the output btw: Thank you for your help. |
Thank you for the clarification! I just tested and your architectures look fine. When you say it didn't work for the |
Sorry, I updated my question, when I say it doesn't work it means that when I plot the reconstructed images they look all empty. |
OK, thanks for clarifying. I am not that surprised that you struggle making it work with the However, this is a bit more unexpected for the Have you tried the following:
|
It depends on which implementation you are using. If you use yours for the return (
(recon_loss + 1e-2 * embedding_loss).mean( ### here the 1e-2 can be set to 0
dim=0
),
(recon_loss).mean(dim=0),
(embedding_loss).mean(dim=0),
) If you use from pythae.models import RAE_L2_Config, RAE_L2
config = RAE_L2_Config(
input_dim=(1, 128, 128),
embedding_weight=0, # changes the factor before the embedding loss
reg_weight=0 # changes the weight decay for the decoder's optimizer
)
model = RAE_L2(config, encoder, decoder) Just to be sure, can you confirm that the networks you use for the |
Hello I was trying your library for my master dissertation. My dataset contains 128x128 images and I need to adapt the code to run some of your model archictures.
I successfully did this with VAE but I'm having some issues adapting VAEGAN and RAE-L2 (mat1 and mat2 shapes cannot be multiplied (64x65536 and 1024x1)).
Do you have any example on how to adapt different models to the image size I'm using?
I would really like to run this benchmark on my project data and see the different results for each one.
Thank you for your amazing work.
Regards.
The text was updated successfully, but these errors were encountered: