I want to learn about pytorch, How to use it like it's part of me I already know how to…
- User
I want to learn about pytorch, How to use it like it's part of me I already know how to ready tensor shape Say they gave me tensor.Size([ 3, 2, 10 ]) The way I read it is from the back First I say okay the tensor have innermost 10 Say [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] Now 2 mean 2 of that 10 That's [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ],
[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
3 mean 3 of that [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] ],
[ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]]
Like it's so easy if there's more you can know it means the number of that previous I love it
And the same rules apply even on more you can you that Also I know what dimension is from just that, I learnt what dimension from that say the size([ 3, 2, 10]) It's this way [ D1, D2, D3 ] The same rules applies to moee Nothing else let say we zip it yeah I know what zip in python is [ (D1, 3), (D2, 2), (D3, 10) ] so overall the tensor have D3 cuz that's the last, infact if you know the len of the size that's the dimension of the stuff you're working on
I will one day build my own lib for that for people new like me to reason it Its self explain so each tensor have dimension The dimension is just items their Say D1 we have 3 items D2 we have 2 items D3 have 10 items
If we have size([ 4 ]) It means the tensor have 4 items It's dim 1 That's D1 only => D1, 4
Hey now I don't know how say we have items with 4 dims how can I access the 2nd dimension items
- Assistant