

You can use the tensorboard.notebook APIs for a bit more control: from tensorboard import notebook If a different logs directory was chosen, a new instance of TensorBoard would be opened. The same TensorBoard backend is reused by issuing the same command. You can also start TensorBoard before training to monitor it in progress: %tensorboard -logdir logs The %tensorboard magic has exactly the same format as the TensorBoard command line invocation, but with a %-sign in front of it. Some dashboards are not available yet in Colab (such as the profile plugin). You can now view dashboards such as Time Series, Graphs, Distributions, and others. Start TensorBoard within the notebook using magics: %tensorboard -logdir logs Tensorboard_callback = tf.(logdir, histogram_freq=1) Train the model using Keras and the TensorBoard callback: def train_model(): Tf.(10, activation='softmax', name='layers_dense_2') (x_train, y_train),(x_test, y_test) = fashion_mnist.load_data() Import TensorFlow, datetime, and os: import tensorflow as tfĭownload the FashionMNIST dataset and scale it: fashion_mnist = tf._mnist # Load the TensorBoard notebook extension Also, pass -bind_all to %tensorboard to expose the port outside the container. To have concurrent instances, it is necessary to allocate more ports. This will allocate a port for you to run one TensorBoard instance. Where the -p 6006 is the default port of TensorBoard.


Thus, run the container with the following command: docker run -it -p 8888:8888 -p 6006:6006 \ The environment’s bin directory to PATH, as described here.įor Docker users: In case you are running a Docker image of Jupyter Notebook server using TensorFlow's nightly, it is necessary to expose not only the notebook's port, but the TensorBoard's port. One way to do this is to modify the kernel_spec to prepend The tensorboard binary is on your PATH inside the Jupyter notebookĬontext. More complicated setup, like a global Jupyter installation and kernelsįor different Conda/virtualenv environments, then you must ensure that The same virtualenv, then you should be good to go. Start by installing TF 2.0 and loading the TensorBoard notebook extension:įor Jupyter users: If you’ve installed Jupyter and TensorBoard into This can be helpful for sharing results, integrating TensorBoard into existing workflows, and using TensorBoard without installing anything locally. TensorBoard can be used directly within notebook experiences such as Colab and Jupyter.
