CLIP4Clip icon indicating copy to clipboard operation
CLIP4Clip copied to clipboard

train dataset is shuffled regardless of seed

Open goonbamm opened this issue 2 years ago • 0 comments

Thank you for your great code.

Actually, I found that the dataset sampler does not get any seed, so it use default value '0' as seed. It seems that the seed only affects the initialization of the model.

So I think we need add the following parameters for all samplers.

train_sampler = torch.utils.data.distributed.DistributedSampler(msvd_dataset)
# default: shuffle = True, seed = 0
train_sampler = torch.utils.data.distributed.DistributedSampler(msvd_dataset, shuffle=True, seed=args.seed)

I apologize in advance if I'm wrong.

goonbamm avatar Jul 14 '23 04:07 goonbamm