You can follow along with the code in the Jupyter R notebook ch-17d_TensorBoard_in_R.
You can view the TensorBoard with the tensorboard() function as follows:
tensorboard('logs')
Here, 'logs' is the folder where the TensorBoard logs should be created.
The data will be shown as the epochs execute and the data is recorded. In R, collecting the data for TensorBoard depends on the package being used:
- If you are using the tensorflow package, then attach the tf$summary$scalar operations to the graph
- If you are using the tfestimators package, then TensorBoard data is automatically written to the model_dir parameter that is specified while creating the estimator
- If you are using the keras package, then you have to include the callback_tensorboard() function while training the model using the fit() function
We modify the training in the Keras example...