Altiki:

I am stuck at rewriting tf.while_loop(), which, as I managed to understand, is a special function in Tensorflow:


You can use the Python while loop in PyTorch directly.



 Altiki:

Another thing, how do I run a simulation? In Tensorflow it is with this line:


PyTorch doesn’t use sessions and will be eagerly executed. I.e. if you run a PyTorch operation (in the default mode), the result is directly available (similar to e.g. numpy).