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

Training Issue: TypeError: '>' not supported between instances of 'NoneType' and 'int' #98

Closed
jkini opened this issue Oct 20, 2023 · 1 comment

Comments

@jkini
Copy link

jkini commented Oct 20, 2023

I encounter the following message when training the SwinBase model, using the COCO dataset.

Command:
python train_net.py --num-gpus 1 --config-file configs/diffdet.coco.swinbase.yaml

Error:

Traceback (most recent call last):
  File "/home/jkini/Projects/DiffusionDet/train_net.py", line 290, in <module>
    launch(
  File "/home/jkini/Projects/DiffusionDet/detectron2/detectron2/engine/launch.py", line 84, in launch
    main_func(*args)
  File "/home/jkini/Projects/DiffusionDet/train_net.py", line 282, in main
    trainer = Trainer(cfg)
  File "/home/jkini/Projects/DiffusionDet/train_net.py", line 57, in __init__
    data_loader = self.build_train_loader(cfg)
  File "/home/jkini/Projects/DiffusionDet/train_net.py", line 118, in build_train_loader
    return build_detection_train_loader(cfg, mapper=mapper)
  File "/home/jkini/Projects/DiffusionDet/detectron2/detectron2/config/config.py", line 208, in wrapped
    return orig_func(**explicit_args)
  File "/home/jkini/Projects/DiffusionDet/detectron2/detectron2/data/build.py", line 549, in build_detection_train_loader
    return build_batch_data_loader(
  File "/home/jkini/Projects/DiffusionDet/detectron2/detectron2/data/build.py", line 339, in build_batch_data_loader
    data_loader = torchdata.DataLoader(
  File "/home/jkini/anaconda3/envs/dd/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 243, in __init__
    assert prefetch_factor > 0
TypeError: '>' not supported between instances of 'NoneType' and 'int'

Any recommendations or fixes?

@jkini
Copy link
Author

jkini commented Oct 20, 2023

Refer to the below link for the fix:

facebookresearch/detectron2#5086

@jkini jkini closed this as completed Oct 20, 2023
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