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

Train VNet with all 80 labels #9

Closed
shinomiya-akirawane opened this issue Feb 28, 2023 · 1 comment
Closed

Train VNet with all 80 labels #9

shinomiya-akirawane opened this issue Feb 28, 2023 · 1 comment

Comments

@shinomiya-akirawane
Copy link

Sorry to raise issues again.
When I try to train the Vnet with all 80 labels, I get this error message:

Traceback (most recent call last):
  File "/home/zhaoyan/MC-Net/./code/train_mcnet_3d.py", line 111, in <module>
    batch_sampler = TwoStreamBatchSampler(labeled_idxs, unlabeled_idxs, args.batch_size, args.batch_size-labeled_bs)
  File "/home/zhaoyan/MC-Net/code/dataloaders/dataset.py", line 327, in __init__
    assert len(self.secondary_indices) >= self.secondary_batch_size > 0
AssertionError

The reason is that zero is passed to the init function of TwoStreamBatchSampler class. Am I using the wrong method to train the model?

@ycwu1997
Copy link
Owner

Such a two-stream sampling strategy is only used for semi-supervised settings (a batch contains labeled and unlabeled data at the same time). You don't have any unlabeled data in your scenario, so just using the original sampling strategy of pytorch is fine.

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