3dbraingen icon indicating copy to clipboard operation
3dbraingen copied to clipboard

128 instead of 64

Open Kunjal1999 opened this issue 1 year ago • 2 comments

Hello, I am trying to use the framework on a custom dataset. In VAEGAN_ADNI_train, I want to resize the images to 128128128 by setting sp_size=128 instead of sp_size=64. On running the code for training, for the line mean,logvar,code = E(real_images), I get the following exception:

RuntimeError                              Traceback (most recent call last)
<ipython-input-43-3a5c933a2738> in <cell line: 11>()
     19         #real_array.append(real_images)
     20         z_rand = Variable(torch.randn((_batch_size, latent_dim)),requires_grad=False).cuda()
---> 21         mean,logvar,code = E(real_images)
     22         x_rec = G(code)
     23         x_rand = G(z_rand)

5 frames
/usr/local/lib/python3.10/dist-packages/torch/nn/modules/linear.py in forward(self, input)
    112 
    113     def forward(self, input: Tensor) -> Tensor:
--> 114         return F.linear(input, self.weight, self.bias)
    115 
    116     def extra_repr(self) -> str:

RuntimeError: mat1 and mat2 shapes cannot be multiplied (4x262144 and 32768x2048)

What other changes do I need to make to make the framework accept images of various sizes? (64,128,142,256, etc.)

Kunjal1999 avatar May 18 '23 07:05 Kunjal1999

Hi, since we did not implemented the model on different resolution,

the model should be modified to get the higher resolution images.

I apologize for inconvenience.

Thanks

cyclomon avatar May 24 '23 00:05 cyclomon

Could you kindly provide more specific details regarding the modifications needed to get higher resolution images?

Kunjal1999 avatar May 24 '23 16:05 Kunjal1999