Train a 2D VAE with dual channel images #422
postmarone96
started this conversation in
General
Replies: 1 comment 6 replies
-
Hi, Can you verify you don't get this error for images/reconstructions with a single channel? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, i have a question about the visual autoencoder, what if the input images have 2 channels or even 3.
I get a tensor shape mismatch error in the the following line :
p_loss = perceptual_loss(reconstruction.float(), images.float())
- The Shape of the
reconstruction.float()
: torch.Size([1, 2, 256, 256])- The shape of
images.float()
: torch.Size([1, 2, 256, 256])here are the parameters i used for the AutoencoderKL :
autoencoderkl
= AutoencoderKL(spatial_dims=2,
in_channels=2,
out_channels=2,
num_channels=(128, 128, 256),
latent_channels=3, num_res_blocks=2,
attention_levels=(False, False, False),
with_encoder_nonlocal_attn=False,
with_decoder_nonlocal_attn=False
)
discriminator
= PatchDiscriminator(spatial_dims=2,
num_layers_d=3,
num_channels=64,
in_channels=2,
out_channels=2
)
Thank very much in advance !!
here is the error log : Error_log.pdf
Beta Was this translation helpful? Give feedback.
All reactions