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
Traceback (most recent call last):
File "/home/hipeson/ljh/A-pidnet-main/tools/train.py", line 218, in
main()
File "/home/hipeson/ljh/A-pidnet-main/tools/train.py", line 180, in main
train(config, epoch, config.TRAIN.END_EPOCH,
File "/home/hipeson/ljh/A-pidnet-main/tools/../utils/function.py", line 43, in train
losses, _, acc, loss_list = model(images, labels, bd_gts)
File "/home/hipeson/anaconda3/envs/myopenmmlab/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/hipeson/anaconda3/envs/myopenmmlab/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 165, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/hipeson/anaconda3/envs/myopenmmlab/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/hipeson/ljh/A-pidnet-main/tools/../utils/utils.py", line 50, in forward
loss_b = self.bd_loss(outputs[-1], bd_gt)
File "/home/hipeson/anaconda3/envs/myopenmmlab/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/hipeson/ljh/A-pidnet-main/tools/../utils/criterion.py", line 129, in forward
bce_loss = self.coeff_bce * weighted_bce(bd_pre, bd_gt)
File "/home/hipeson/ljh/A-pidnet-main/tools/../utils/criterion.py", line 114, in weighted_bce
weight[pos_index] = neg_num * 1.0 / sum_num
IndexError: The shape of the mask [1, 6] at index 1 does not match the shape of the indexed tensor [1, 524288] at index 1
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "/home/hipeson/ljh/A-pidnet-main/tools/train.py", line 218, in
main()
File "/home/hipeson/ljh/A-pidnet-main/tools/train.py", line 180, in main
train(config, epoch, config.TRAIN.END_EPOCH,
File "/home/hipeson/ljh/A-pidnet-main/tools/../utils/function.py", line 43, in train
losses, _, acc, loss_list = model(images, labels, bd_gts)
File "/home/hipeson/anaconda3/envs/myopenmmlab/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/hipeson/anaconda3/envs/myopenmmlab/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 165, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/hipeson/anaconda3/envs/myopenmmlab/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/hipeson/ljh/A-pidnet-main/tools/../utils/utils.py", line 50, in forward
loss_b = self.bd_loss(outputs[-1], bd_gt)
File "/home/hipeson/anaconda3/envs/myopenmmlab/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/hipeson/ljh/A-pidnet-main/tools/../utils/criterion.py", line 129, in forward
bce_loss = self.coeff_bce * weighted_bce(bd_pre, bd_gt)
File "/home/hipeson/ljh/A-pidnet-main/tools/../utils/criterion.py", line 114, in weighted_bce
weight[pos_index] = neg_num * 1.0 / sum_num
IndexError: The shape of the mask [1, 6] at index 1 does not match the shape of the indexed tensor [1, 524288] at index 1
The text was updated successfully, but these errors were encountered: