Open larry10hhobh opened 4 years ago
Hi, thanks for running this repo.
The batch from train_loader is 64x4x3x32x32. The dimension '4' means one normal data + three transformed data. After x.view(), its shape is (64x4)x3x32x32. Suppose the output feature shape is (64x4)xF. nor_index and aug_index split the output features into two tensors: 64xF (normal) and 192xF (transformed). These two tensors are corresponding to nor_rep and aug_rep.
你好,我的疑惑主要是这个4是怎么来的。 pytorch进行是在线增广,这样1个epoch里面应该不会同时出现1个样本及其变换吧。即便存在的话,为什么确定是一个原本加上增广的3个样本,这个1+3是怎么来的?
没有使用torchvision.datasets.CIFAR100,而是对dataset进行了修改,参见cifar.py
好的,感谢解答~
Hi
Thank U for your code. I find a question in code of contrastive prediction. In student.py
I think nor_rep and aug_rep come from different samples. It is not the relation between X and its transformation mentioned in the paper. Is my understanding wrong?