Open sekyondaMeta opened 4 months ago
/assigntome
/assigntome
The issue is already assigned. Please pick an opened and unnasigned issue with the docathon-h1-2024 label.
Hi @svekars @kit1980 There was no issue while running this tutorial as python script and in Google colab. gcp_testing.txt local_testing.txt Updated_Documentation..txt May be we can explain the last part as
To represent categorical labels as one-hot encoded tensors, we start with an initial tensor array of zeros. For labels ranging from 1 to 10, the initial tensor array will be: torch.zeros(10, dtype=torch.float) will give [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0] Given a specific label for an image, say 3, the value 1.0 will be assigned to the corresponding index in the tensor array. Since indices start from 0, the label 3 will correspond to index 2. Thus, the final one-hot encoded tensor array will be: torch.zeros(10, dtype=torch.float).scatter_(dim=0, index=torch.tensor(y), value=1) will give [0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
Hi, @subramen, do these suggestions for the Transforms tutorial sound good?
@saurabhkthakur maybe create a PR with the updated doc so people can see it and review?
Test the following tutorial: https://pytorch.org/tutorials/beginner/basics/transforms_tutorial.html Follow these steps:
cc @svekars @kit1980