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

wrong transform order #35

Open
yuanzhanghu opened this issue Nov 14, 2020 · 1 comment
Open

wrong transform order #35

yuanzhanghu opened this issue Nov 14, 2020 · 1 comment

Comments

@yuanzhanghu
Copy link

yuanzhanghu commented Nov 14, 2020

In CIFAR10_labeled class, we have: self.data = transpose(normalise(self.data)) inside the __init__(),
while we do transform for each item in __get_item__()

Which means we do normalization first, then when we call labeled_train_iter.next()
in train.py, we do these image transform after normalization, which I believe is not reasonable.
these transforms include: dataset.RandomPadandCrop(32), dataset.RandomFlip()

@sakumashirayuki
Copy link

I agree with you. And if we use transforms in torchvision.transforms, we can learn that the transforms.Normalize can only be applied to tensor, which means it should be used after all image transforms

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

2 participants