Thank you.



 ptrblck:

No, Autograd knows how to propagate the gradients through squeeze.


What would have been the outcome if Autograd did not know how to do this? An exception/error message saying something about gradients not being computable?



 ptrblck:

The ones are expected or which values would you expect when squeezing/unsqueezing a dimension with the size of 1?


I cannot figure this out: what is the derivative of with respect to merely rearranging data? I am not sure if there is a way to define this. But perhaps since there is no  change in the values we can take this derivative to be zero? Is this what Autograd is doing here? It is adding the zeros to the original ones, so the ones stay where they are?
(Please don’t bother answering this question if it is too silly.)



 ptrblck:

This tutorial might be a good starter.


I have skimmed this once or twice. I guess it is time to bite the bullet and go through it more carefully!