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
hello, I use the new version to train with multi classes dataset of KITTI semantics. but I meet the error like this
`
INFO: Using device cuda
INFO: Network:
3 input channels
20 output channels (classes)
Bilinear upscaling
INFO: Creating dataset with 200 examples
INFO: Starting training:
Epochs: 5
Batch size: 1
Learning rate: 0.0001
Training size: 180
Validation size: 20
Checkpoints: True
Device: cuda
Images scaling: 0.5
Epoch 1/5: 0%| | 0/180 [00:00<?, ?img/s]
Traceback (most recent call last):
File "/home/lab2/work/lhx/Unet/train.py", line 179, in
val_percent=args.val / 100)
File "/home/lab2/work/lhx/Unet/train.py", line 78, in train_net
loss = criterion(masks_pred, true_masks)
File "/home/lab2/anaconda3/envs/torch1.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/lab2/anaconda3/envs/torch1.6/lib/python3.6/site-packages/torch/nn/modules/loss.py", line 948, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "/home/lab2/anaconda3/envs/torch1.6/lib/python3.6/site-packages/torch/nn/functional.py", line 2422, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/home/lab2/anaconda3/envs/torch1.6/lib/python3.6/site-packages/torch/nn/functional.py", line 2220, in nll_loss
ret = torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: 1only batches of spatial targets supported (3D tensors) but got targets of size: : [1, 1, 187, 621]
`
The text was updated successfully, but these errors were encountered:
hello, I use the new version to train with multi classes dataset of KITTI semantics. but I meet the error like this
`
INFO: Using device cuda
INFO: Network:
3 input channels
20 output channels (classes)
Bilinear upscaling
INFO: Creating dataset with 200 examples
INFO: Starting training:
Epochs: 5
Batch size: 1
Learning rate: 0.0001
Training size: 180
Validation size: 20
Checkpoints: True
Device: cuda
Images scaling: 0.5
Epoch 1/5: 0%| | 0/180 [00:00<?, ?img/s]
Traceback (most recent call last):
File "/home/lab2/work/lhx/Unet/train.py", line 179, in
val_percent=args.val / 100)
File "/home/lab2/work/lhx/Unet/train.py", line 78, in train_net
loss = criterion(masks_pred, true_masks)
File "/home/lab2/anaconda3/envs/torch1.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/lab2/anaconda3/envs/torch1.6/lib/python3.6/site-packages/torch/nn/modules/loss.py", line 948, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "/home/lab2/anaconda3/envs/torch1.6/lib/python3.6/site-packages/torch/nn/functional.py", line 2422, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/home/lab2/anaconda3/envs/torch1.6/lib/python3.6/site-packages/torch/nn/functional.py", line 2220, in nll_loss
ret = torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: 1only batches of spatial targets supported (3D tensors) but got targets of size: : [1, 1, 187, 621]
`
The text was updated successfully, but these errors were encountered: