Since TensorFlow 2.2, all this boiler plate code is no longer needed. You only need to tell TensorFlow how every single train step (and possibly test step) will look like. The rest is done inside the tf.keras.Model class. Let's not beat around the bush, here is the code: The example was far to simple to use them. But I hope it served its purpose in demonstrating the different approaches without the need to explain a complicated model. I would like to do than in some upcoming article.
Jun-30-2020, 19:12:26 GMT