PyTorch & TensorFlow
You may find here a Google Colab Notebook that illustrates the previous example using PyTorch and Tensorflow.
That notebook is read-only, but you can copy it to your personal workspace.
This way, you can execute it, modify it, and play with it as much as you want!