-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Minor style bug: remove backticks in the section of code #2814
Comments
Satyamkhadka
added a commit
to Satyamkhadka/tutorials
that referenced
this issue
Mar 28, 2024
removed commented code block and backticks
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On this page => https://pytorch.org/tutorials/beginner/introyt/introyt1_tutorial.html
in Datasets and Dataloaders section,
[Expected Result]
[ACTUAL RESULT]
```
from torch.utils.data
import ConcatDataset
transform = transforms.Compose([transforms.ToTensor()])
trainset = torchvision.datasets.CIFAR10(root=’./data’, train=True,download=True, transform=transform)
#stack all train images together into a tensor of shape
#(50000, 3, 32, 32)
x = torch.stack([sample[0] for sample in ConcatDataset([trainset])])
#get the mean of each channel
mean = torch.mean(x, dim=(0,2,3)) #tensor([0.4914, 0.4822, 0.4465])
std = torch.std(x, dim=(0,2,3)) #tensor([0.2470, 0.2435, 0.2616])
```
The text was updated successfully, but these errors were encountered: