MixMatch-pytorch icon indicating copy to clipboard operation
MixMatch-pytorch copied to clipboard

Unlabelled batch size

Open AlexTS1980 opened this issue 3 years ago • 5 comments

According to the paper, there's a set of labelled and unlabelled datapoints that are mixed. In the code nevertheless there are two unlabelled sets, u1 and u2. Both of them are added to the mixed set. So my question is, why are there two such sets?

AlexTS1980 avatar Apr 24 '21 16:04 AlexTS1980

Same question.

dadaplm avatar Oct 05 '21 03:10 dadaplm

In Sec. 3.1 of the paper, ''For each u in the batch of unlabeled data U, we generate K augmentations.'' And K is 2 in the paper, so u1 and u2 are used.

YU1ut avatar Oct 05 '21 03:10 YU1ut

In Sec. 3.1 of the paper, ''For each u in the batch of unlabeled data U, we generate K augmentations.'' And K is 2 in the paper, so u1 and u2 are used.

Thank you,another question is that in the code "inputs_u" and "inputs_u2" are from the different batch ? Can I change "(inputs_u, inputs_u2), _ = unlabeled_train_iter.next()" into "inputs_u = unlabeled_train_iter.next() inputs_u2 = unlabeled_train_iter.next()" ? Thank you so much.

dadaplm avatar Oct 05 '21 04:10 dadaplm

In Sec. 3.1 of the paper, ''For each u in the batch of unlabeled data U, we generate K augmentations.'' And K is 2 in the paper, so u1 and u2 are used.

I use another dataset.

dadaplm avatar Oct 05 '21 04:10 dadaplm

They are from the same batch but with different augmentations. See here: https://github.com/YU1ut/MixMatch-pytorch/blob/master/dataset/cifar10.py#L7-L14

YU1ut avatar Oct 05 '21 04:10 YU1ut