Skip to content
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

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

Open
LTyanghuang opened this issue Sep 19, 2024 · 0 comments

Comments

@LTyanghuang
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant