lxysl / PLReMix

Official pytorch implementation code of paper "PLReMix: Combating Noisy Labels with Pseudo-Label Relaxed Contrastive Representation Learning"
MIT License
1 stars 0 forks source link

Hi, there are some issues about the infoNCEloss #1

Open LanXiaoPang613 opened 5 months ago

LanXiaoPang613 commented 5 months ago

Hi, there are some issues about the infoNCEloss:

when we define the info_nce_loss in the code as follows: *info_nce_loss = InfoNCELoss(temperature=0.1, batch_size=args.batch_size 2, flat=('flat' in args.crl), n_views=8 if args.mcrop else 2)** the labels size in the function of infoNCELoss is batch_size x 2 x n_views, while the size of the features are batch_size x n_views. Since the sizes of these two params are not matched, the calculation of the infoNCEloss is not correct. image

lxysl commented 5 months ago

The features are comprised of two parts: labeled and unlabeled, each with a size equal to batch_size*n_views.

LanXiaoPang613 commented 5 months ago

The features are comprised of two parts: labeled and unlabeled, each with a size equal to batch_size*n_views.

I know, but when this function is used to perform warm-up training, it will be incorrect. If possible, you can check it.

lxysl commented 5 months ago

If you are asking the warm-up stage, I guess this line is what you are looking for: https://github.com/lxysl/PLReMix/blob/77cf96bd964b076d52a58501bc8d19d5d853307f/data/data_loader.py#L361

LanXiaoPang613 commented 5 months ago

If you are asking the warm-up stage, I guess this line is what you are looking for:

https://github.com/lxysl/PLReMix/blob/77cf96bd964b076d52a58501bc8d19d5d853307f/data/data_loader.py#L361

OKay,i ignore this line. Thank you.

LanXiaoPang613 commented 5 months ago

If possible, could you hare me a training log about the PLRemix on webvision, it seems i met some problems when training on this set.