This is the output of above code
Weights:
tensor([0.0010, 0.0010, 0.0010, 0.0010, 0.0010, 0.0010, 0.0010, 0.0010, 0.0010,
0.0011])
Class count:
tensor([1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000,  945])
train loader:
0 [11, 7, 7, 7, 10, 7, 8, 7, 0, 0]
1 [7, 10, 10, 5, 6, 7, 10, 9, 0, 0]
2 [6, 6, 6, 11, 13, 7, 7, 8, 0, 0]
3 [9, 8, 5, 9, 10, 7, 4, 12, 0, 0]
4 [9, 9, 6, 11, 9, 6, 8, 6, 0, 0]
5 [7, 10, 6, 5, 6, 9, 12, 9, 0, 0]