Enable visualizations for TensorBoard.
tf.compat.v1.keras.callbacks.TensorBoard( log_dir='./logs', histogram_freq=0, batch_size=32, write_graph=True, write_grads=False, write_images=False, embeddings_freq=0, embeddings_layer_names=None, embeddings_metadata=None, embeddings_data=None, update_freq='epoch', profile_batch=2 )
TensorBoard is a visualization tool provided with TensorFlow.
This callback logs events for TensorBoard, including:
If you have installed TensorFlow with pip, you should be able to launch TensorBoard from the command line:
You can find more information about TensorBoard here.
| ||the path of the directory where to save the log files to be parsed by TensorBoard.|
| ||frequency (in epochs) at which to compute activation and weight histograms for the layers of the model. If set to 0, histograms won't be computed. Validation data (or split) must be specified for histogram visualizations.|
| ||whether to visualize the graph in TensorBoard. The log file can become quite large when write_graph is set to True.|
| || whether to visualize gradient histograms in TensorBoard. |
| ||size of batch of inputs to feed to the network for histograms computation.|
| ||whether to write model weights to visualize as image in TensorBoard.|
| || frequency (in epochs) at which selected embedding layers will be saved. If set to 0, embeddings won't be computed. Data to be visualized in TensorBoard's Embedding tab must be passed as |
| ||a list of names of layers to keep eye on. If None or empty list all the embedding layer will be watched.|
| ||a dictionary which maps layer name to a file name in which metadata for this embedding layer is saved. Here are details about metadata files format. In case if the same metadata file is used for all embedding layers, string can be passed.|
| || data to be embedded at layers specified in |
| || |
| ||Profile the batch to sample compute characteristics. By default, it will profile the second batch. Set profile_batch=0 to disable profiling.|
| ||If histogram_freq is set and no validation data is provided.|
TensorBoard callback will work when eager execution is enabled, with the restriction that outputting histogram summaries of weights and gradients is not supported. Consequently,
histogram_freq will be ignored.
set_model( model )
Sets Keras model and creates summary ops.
set_params( params )
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.