VMarsocci / 3DCD

Remote sensing elevation (3D) change detection with deep learning
https://sites.google.com/uniroma1.it/3dchangedetection/home-page
28 stars 2 forks source link

Unable to run the Code. Seems like some architectural issue. Tensor sizes seem to be mismatching. #8

Open nximish opened 1 month ago

nximish commented 1 month ago

Encoder selected: resnet18 Pretrained with the following strategy: imagenet Model selected: mtbit_resnet18 Optimizer selected: adamw Scheduler selected: step_lr No checkpoints founded Trainable parameters: 13198763, total parameters 13198763 Epoch: 1 - Learning rate: 0.0001 0% 0/22 [00:00<?, ?it/s]torch.Size([15, 32, 100, 100]) torch.Size([1, 32, 64, 64]) 0% 0/22 [00:06<?, ?it/s] Traceback (most recent call last): File "/content/drive/MyDrive/3DCD/3DCD/train.py", line 203, in out2d, out3d = net(t1, t2) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(args, **kwargs) File "/content/drive/MyDrive/3DCD/3DCD/models/MTBIT.py", line 207, in forward x1 = self._forward_transformer_decoder(x1, token1) File "/content/drive/MyDrive/3DCD/3DCD/models/MTBIT.py", line 178, in _forward_transformer_decoder x = x + self.pos_embedding_decoder RuntimeError: The size of tensor a (100) must match the size of tensor b (64) at non-singleton dimension 3

VMarsocci commented 3 weeks ago

Hi, can you try to run it with an image size divisible by 4?