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

TypeError: '>' not supported between instances of 'NoneType' and 'int' #194

Open
Fyzde opened this issue Sep 25, 2023 · 2 comments
Open

Comments

@Fyzde
Copy link

Fyzde commented Sep 25, 2023

when i run "python tools/train_net.py --num-gpus 1
--config-file configs/PascalVOC-detection/split1/faster_rcnn_R_101_base1.yaml"

TypeError: '>' not supported between instances of 'NoneType' and 'int'

@Fyzde
Copy link
Author

Fyzde commented Sep 25, 2023

Traceback (most recent call last):
File "/home/fyz/anaconda3/envs/pytorch1.13.1/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/fyz/anaconda3/envs/pytorch1.13.1/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/fyz/few-shot-object-detection/tools/train_net.py", line 113, in
launch(
File "/home/fyz/tools/detectron2/detectron2/engine/launch.py", line 84, in launch
main_func(*args)
File "/home/fyz/few-shot-object-detection/tools/train_net.py", line 105, in main
trainer = Trainer(cfg)
File "/home/fyz/few-shot-object-detection/fsdet/engine/defaults.py", line 305, in init
data_loader = self.build_train_loader(cfg)
File "/home/fyz/few-shot-object-detection/fsdet/engine/defaults.py", line 496, in build_train_loader
return build_detection_train_loader(cfg)
File "/home/fyz/tools/detectron2/detectron2/config/config.py", line 208, in wrapped
return orig_func(**explicit_args)
File "/home/fyz/tools/detectron2/detectron2/data/build.py", line 549, in build_detection_train_loader
return build_batch_data_loader(
File "/home/fyz/tools/detectron2/detectron2/data/build.py", line 339, in build_batch_data_loader
data_loader = torchdata.DataLoader(
File "/home/fyz/anaconda3/envs/pytorch1.13.1/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 243, in init
assert prefetch_factor > 0
TypeError: '>' not supported between instances of 'NoneType' and 'int'

@pinnintipraneethkumar
Copy link

Hii,
Check your dataset and ensure that the necessary data, such as annotations or labels, is present and correctly formatted. If data is missing or improperly labeled, it can lead to None values in critical places.

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

2 participants