Helge:

storing the results in Z with requires_grad=False


Does it means detach Z_t (t>=1) from the graph? If just setting Z.requires_grad_(False), it will raise an error, because it is an intermediate node which used for calculate gradient for Z_0.