We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
← All tracks
0 / 4
Shapes and Strides
PyTorchThe model everything else rests on: a tensor is a buffer, a shape and a stride, and most of what looks like work is arithmetic on the last two. Where `view` succeeds, where it refuses, and why `reshape` is not a synonym.
0
/ 9 solved
- 1. Not solved yet. Read the stride
- 2. Not solved yet. view refuses, reshape copies
- 3. Not solved yet. NCHW to NHWC, for free
- 4. Not solved yet. The batch of one
- 5. Not solved yet. Scale every row by its own weight
- 6. Not solved yet. Fold the heads into the batch
- 7. Not solved yet. The third number in a tensor
- 8. Not solved yet. Windows that overlap and cost nothing
- 9. Not solved yet. Move one axis, not all of them
Check yourself
4 questions · one attempt eachThese do not count toward finishing the track. They are here to catch the things that are easy to read past.
After a transpose, view raises but reshape works. Why?
x.transpose(1, 2).view(-1)
x.transpose(1, 2).reshape(-1)
Question 1 of 4