mmrotate icon indicating copy to clipboard operation
mmrotate copied to clipboard

raise ValueError("batch_size should be a positive integer value, " ValueError: batch_size should be a positive integer value, but got batch_size=0

Open LTyanghuang opened this issue 5 months ago • 0 comments

What's the feature?

2024-09-19 02:42:59,779 - mmcv - INFO - bbox_head.retina_cls.weight - torch.Size([135, 256, 3, 3]): NormalInit: mean=0, std=0.01, bias=-4.59511985013459

2024-09-19 02:42:59,779 - mmcv - INFO - bbox_head.retina_cls.bias - torch.Size([135]): NormalInit: mean=0, std=0.01, bias=-4.59511985013459

2024-09-19 02:42:59,779 - mmcv - INFO - bbox_head.retina_reg.weight - torch.Size([45, 256, 3, 3]): NormalInit: mean=0, std=0.01, bias=0

2024-09-19 02:42:59,779 - mmcv - INFO - bbox_head.retina_reg.bias - torch.Size([45]): NormalInit: mean=0, std=0.01, bias=0

Traceback (most recent call last): File "tools/train.py", line 194, in main() File "tools/train.py", line 183, in main train_detector( File "/root/dota_workspace/mmrotate/mmrotate/apis/train.py", line 83, in train_detector data_loaders = [build_dataloader(ds, **train_loader_cfg) for ds in dataset] File "/root/dota_workspace/mmrotate/mmrotate/apis/train.py", line 83, in data_loaders = [build_dataloader(ds, **train_loader_cfg) for ds in dataset] File "/local/miniconda/envs/moca_cv/lib/python3.8/site-packages/mmdet/datasets/builder.py", line 195, in build_dataloader data_loader = DataLoader( File "/local/miniconda/envs/moca_cv/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 274, in init batch_sampler = BatchSampler(sampler, batch_size, drop_last) File "/local/miniconda/envs/moca_cv/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 218, in init raise ValueError("batch_size should be a positive integer value, " ValueError: batch_size should be a positive integer value, but got batch_size=0

Any other context?

在训练的时候报错bacth_size=0; python tools/train.py configs/rotated_retinanet/rotated_retinanet_obb_r50_fpn_1x_dota_ms_rr_le90.py --resume-from rotated_retinanet_obb_r50_fpn_1x_dota_ms_rr_le90-1da1ec9c.pth --work-dir logs/ --gpus 0

LTyanghuang avatar Sep 19 '24 02:09 LTyanghuang