TensorFlow ecosystem
On top of the main library, TensorFlow offers numerous tools useful for machine learning. While some of them are shipped with TensorFlow, others are grouped under TensorFlow Extended (TFX) and TensorFlow Addons. We will introduce the most commonly used tools.
TensorBoard
While the progress bar we used in the first example of this chapter displayed useful information, we might want to access more detailed graphs. TensorFlow provides a powerful tool for monitoring—TensorBoard. Installed by default with TensorFlow, it is also very easy to use combined with Keras's callbacks:
callbacks = [tf.keras.callbacks.TensorBoard('./logs_keras')] model.fit(x_train, y_train, epochs=5, verbose=1, validation_data=(x_test, y_test), callbacks=callbacks)
In this updated code, we pass the TensorBoard callback to the model.fit()
method. By default, TensorFlow will automatically write the loss and the metrics to the folder we specified. We can then launch TensorBoard from the command line:
$ tensorboard...