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

Issue with the new loader? #42

Open
eanil opened this issue Oct 3, 2024 · 0 comments
Open

Issue with the new loader? #42

eanil opened this issue Oct 3, 2024 · 0 comments

Comments

@eanil
Copy link

eanil commented Oct 3, 2024

It seems with the @shaing10 's changes, the returned vis_masks in the train() function are already batched.

If the batch_size=5, you will get a vis_mask of [5, 196, 200] returned by the DataLoader.

Next, Line 61
vis_mask = vis_mask.repeat((batch_size,)+(1,)*len(vis_mask.shape))
adds another dimension of batch_size and we end up with a [5, 5, 196, 200] tensor, the first dimension being just repeats.

Has anyone actually ran this change with a batch_size > 1?

I think the correct way is to replace Line 61 with:
vis_mask = vis_mask.unsqueeze(1)
which turns vis_mask into a [5, 1, 196, 200] tensor.

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