Using Jupyter Notebook

Prev Next

Available in Classic and VPC

Connect to Jupyter Notebook

tensorflow-1-2-101_en.png

① Run your web browser and connect to public IP address:18888.

  • The public IP address can be found by Public IP Address value in the server list of the Console’s Server menu.
  • The port 18888 must have been added to ACG rule.

② Enter the password you have changed by the ‘jup passwd’ in a terminal program and click [Log in] button.

Execute sample code

tensorflow-1-2-102_en.png

① Click the ‘samples’ folder, and from the 7 sample code files, select ‘7.TensorFlow MNIST Basic Sample.ipynb’ to open it.

② In the first square box, click on any code area and press Shift+Enter to execute a code.

③ If it is running, ‘[*]’ appears before the code. If you saw a number instead of ‘*’, it’s done, so press Shift+Enter to continue.

④ To exit, click File > Close and Halt.

Write new code

tensorflow-1-2-103_en.png

① Click New > Python 3 to start writing a code.

  • Since TensorFlow related package is installed, you can import and use it immediately.

② If you press Tab key during creation, the autocomplete list will be displayed. Select a target with Arrow key and press Enter key to display the selected value.

③ If you enter a question mark(?) next to a function or class and execute the code by pressing Ctrl+Enter or Shift+Enter, the instructions will be displayed at the bottom of the window.

④ Click [+] button (insert cell below) at the top to add a line at the bottom where you can write a code.

⑤ To change the file name, click Untitled at the top and enter a new file name in the popup window that appears, and then click OK button.

⑥ Click Save and Checkpoint button at the top to save the details you have entered.

⑦ To finish writing the code, click File > Close and Halt menu.

Manage package via Python code

tensorflow-1-2-105_en.png

① Select New > Python 3 menu to create a new page.

② To see the list of all installed packages and their versions, enter the following.

!conda list

③ To check Python version, enter the following.

import sys
sys.version

④ To check TensorFlow version, enter the following.

import tensorflow as tf
tf.__version__

⑤ To check the version of a specific package installed, enter the following.

!conda list | grep package_name

⑥ To install new package or new version of installed package, enter conda install command.

!conda install -y package_name=version
ex) !conda install -y conda=4.3   # install conda 4.3 version