albanD:

When you work with Variable, some intermediate results are saved to be able to perform the backward pass if you ever call it.


Thank you! I forgot to make them volatile in this example,  but it does not affect the results much.