mmsegmentation
mmsegmentation copied to clipboard
The training was broken at 1k
I set max_iters to 80k and val_interval to 1000, and the program went 1k times wrongI set max_iters to 80k and val_interval to 1000, and the program went 1k times wrong.
- Here is the error message:
Traceback (most recent call last):
File "tools/train.py", line 104, in
main() File "tools/train.py", line 100, in main runner.train() File "/home/amax/anaconda3/envs/r_mmseg/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1777, in train model = self.train_loop.run() # type: ignore File "/home/amax/anaconda3/envs/r_mmseg/lib/python3.8/site-packages/mmengine/runner/loops.py", line 292, in run self.runner.val_loop.run() File "/home/amax/anaconda3/envs/r_mmseg/lib/python3.8/site-packages/mmengine/runner/loops.py", line 371, in run self.run_iter(idx, data_batch) File "/home/amax/anaconda3/envs/r_mmseg/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "/home/amax/anaconda3/envs/r_mmseg/lib/python3.8/site-packages/mmengine/runner/loops.py", line 392, in run_iter self.evaluator.process(data_samples=outputs, data_batch=data_batch) File "/home/amax/anaconda3/envs/r_mmseg/lib/python3.8/site-packages/mmengine/evaluator/evaluator.py", line 60, in process metric.process(data_batch, _data_samples) File "/media/amax/Newsmy1/A_project/mmsegmentation-main/mmseg/evaluation/metrics/iou_metric.py", line 85, in process self.intersect_and_union(pred_label, label, num_classes, File "/media/amax/Newsmy1/A_project/mmsegmentation-main/mmseg/evaluation/metrics/iou_metric.py", line 186, in intersect_and_union pred_label = pred_label[mask] IndexError: The shape of the mask [497, 512] at index 0 does not match the shape of the indexed tensor [1080, 1920] at index 0
How should I solve this problem?