New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The training was broken at 1k #3640
Comments
Inference error: Image and label size mismatch |
Thank you for your thoughts. I checked that the image and label size matched each other, and I modified the data configuration file according to./config/datasets/ade20k. Changed dataset_type,data_root,scale,img_path,seg_map_path, nothing else. Below is my dataset configuration file: dataset settingsdataset_type = 'CoalDataset' train_pipeline = [ |
I noticed my problem. In the above configuration file, the pipline in val_dataloader should be test_pipeline, I wrote train_pipeline |
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.
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?
The text was updated successfully, but these errors were encountered: