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

How to set prefetch_factor? #95

Open
Pari-singh opened this issue Oct 3, 2023 · 1 comment
Open

How to set prefetch_factor? #95

Pari-singh opened this issue Oct 3, 2023 · 1 comment

Comments

@Pari-singh
Copy link

Pari-singh commented Oct 3, 2023

Hi, I am trying to train on custom data (which is in coco instance seg format). I have followed your suggestions for registering the data and using instance_coco_custom_dataset_mapper.py for it. Dataloading with data distribution visualization part is done successfully, however, I get error in line 339, in build_batch_data_loader:

data_loader = torchdata.DataLoader(
File "/home/pari/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 183, in init
assert prefetch_factor > 0
TypeError: '>' not supported between instances of 'NoneType' and 'int'

For me, prefetch_factor is None and I see no way of setting it in config so far. Can you help me figure out how to set it up - config file for custom instance segmentation would be a great help as well!
(I tried both single GPU for debugging and multiGPU but get same error) @praeclarumjj3

Thanks in advance!

@Pari-singh
Copy link
Author

So I manually set the default as 1 and it works so far, but would love to know what's the solution.
Another warning I am getting while training is:
WARNING [10/02 23:53:15 d2.checkpoint.c2_model_loading]: norm.weight will not be loaded. Please double check and see if this is desired.
WARNING [10/02 23:53:15 d2.checkpoint.c2_model_loading]: Shape of norm.bias in checkpoint is torch.Size([1536]), while shape of sem_seg_head.predictor.transformer_cross_attention_layers.6.norm.bias in model is torch.Size([256]).
Any suggestions/comments? @praeclarumjj3

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