You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`
epoch 0/99
0%| | 0/539 [00:00<?, ?it/s]/root/miniconda3/lib/python3.8/site-packages/torch/nn/functional.py:3454: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
warnings.warn(
d2_out.shape torch.Size([4, 2, 256, 256])
labels.shape torch.Size([4, 3, 256, 256])
0%| | 0/539 [00:01<?, ?it/s]
Traceback (most recent call last):
File "/tmp/pycharm_project_524/my_yaogan/train_EGRCNN.py", line 86, in
val_acc, train_loss = UNet_mloss_train.train_model(UNet_mlstm, dataloaders_dict, criterion, criterion1, optimizer, sc_plt, device, num_epochs=num_epochs)
File "/tmp/pycharm_project_524/my_yaogan/UNet_mloss_train.py", line 60, in train_model
loss_seg_2 = criterion(d2_out, labels)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/tmp/pycharm_project_524/my_yaogan/losses.py", line 23, in forward
logpt = logpt.gather(1, target)
RuntimeError: Size does not match at dimension 0 expected index [786432, 1] to be smaller than src [262144, 2] apart from dimension 1
Process finished with exit code 1
Excuse me, can you upload some training datasets? What can I do to solve this problem?
The text was updated successfully, but these errors were encountered:
I met an issue when I run the train.py
当我用train.py训练WHU数据集时,遇到了下面的问题:
`
epoch 0/99
0%| | 0/539 [00:00<?, ?it/s]/root/miniconda3/lib/python3.8/site-packages/torch/nn/functional.py:3454: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
warnings.warn(
d2_out.shape torch.Size([4, 2, 256, 256])
labels.shape torch.Size([4, 3, 256, 256])
0%| | 0/539 [00:01<?, ?it/s]
Traceback (most recent call last):
File "/tmp/pycharm_project_524/my_yaogan/train_EGRCNN.py", line 86, in
val_acc, train_loss = UNet_mloss_train.train_model(UNet_mlstm, dataloaders_dict, criterion, criterion1, optimizer, sc_plt, device, num_epochs=num_epochs)
File "/tmp/pycharm_project_524/my_yaogan/UNet_mloss_train.py", line 60, in train_model
loss_seg_2 = criterion(d2_out, labels)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/tmp/pycharm_project_524/my_yaogan/losses.py", line 23, in forward
logpt = logpt.gather(1, target)
RuntimeError: Size does not match at dimension 0 expected index [786432, 1] to be smaller than src [262144, 2] apart from dimension 1
Process finished with exit code 1
Excuse me, can you upload some training datasets? What can I do to solve this problem?
The text was updated successfully, but these errors were encountered: