Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorboard not found as magic function in jupyter

I want to run tensorboard in jupyter using the latest tensorflow 2.0.0a0. With the tensorboard version 1.13.1, and python 3.6.

using

... %tensorboard --logdir {logs_base_dir}

I get the error :

UsageError: Line magic function %tensorboard not found

Do you have an idea what the problem could be? It seems that all versions are up to date and the command seems correct too.

Thanks

like image 708
Florida Man Avatar asked May 03 '19 13:05

Florida Man


People also ask

How do you close a TensorBoard in Jupyter notebook?

to close, I just do: close the tensorflow tab on my browser. on jupyter notebook, I click on interrupt kernel.


4 Answers

UPDATE

For newer TF versions (tensorflow>=1.14.0 & tensorflow != 2.0.0a0 - newer than TF2.0-alpha) load the extension like this

%load_ext tensorboard

OLD ANSWER

The extension needs to be loaded first:

%load_ext tensorboard.notebook
%tensorboard --logdir {logs_base_dir}
like image 192
Vlad Avatar answered Oct 11 '22 04:10

Vlad


If you are using TF 2.0 you can execute the code below from your notebook environment, prior to your magic command:

%load_ext tensorboard
like image 28
nimbous Avatar answered Oct 11 '22 04:10

nimbous


That's how I solved it

%load_ext tensorboard
%tensorboard --logdir /content/drive/MyDrive/Dog\ Vision/logs

After --logdir, this is my path directory /content/drive/MyDrive/Dog\ Vision/logs. It should be different for you.

like image 2
Rakibul Islam Avatar answered Oct 11 '22 06:10

Rakibul Islam


Year 2020

I needed to pip uninstall both tensorflow and tensorboard

Then install tf-nightly

In order to get this to work

%load_ext tensorboard.notebook
%tensorboard --logdir {logs_base_dir}
like image 1
Kalanos Avatar answered Oct 11 '22 05:10

Kalanos