How to resolve runtime error due to size mismatch in PyTorch?

前端 未结 3 1108
被撕碎了的回忆
被撕碎了的回忆 2021-02-06 04:54

I am trying to implement a simple autoencoder using PyTorch. My dataset consists of 256 x 256 x 3 images. I have built a torch.utils.data.dataloader.DataLoade

3条回答
  •  一个人的身影
    2021-02-06 05:59

    Your error:

    size mismatch, m1: [76800 x 256], m2: [784 x 128]

    says that previous layer output shape is not equal to next layer input shape

    [76800 x 256], m2: [784 x 128] # Incorrect!
    [76800 x 256], m2: [256 x 128] # Correct!
    

提交回复
热议问题