Note: Notebooks in this repo are written in Python 3 and use TensorFlow (version 1.x). You'll need Jupyter/iPython to run them.
Fetch the repo: github.com/PythonWorkshop/tensorboard_demos
git clone git@github.com:PythonWorkshop/tensorboard_demos
cd tensorboard_demos/Then, choose one of the options below: Conda (if you have Anaconda and conda-env installed), otherwise pip.
- Create a conda environment (auto-installs packages as per
environment.yml) and activate it:
conda env create
source activate tensorflow- Run notebook:
jupyter notebook tensorboard_basics.ipynbFor troubleshooting, see TensorFlow's Anaconda installation instructions.
- Install dependencies first (NumPy, matplotlib, scikit-learn):
pip3 install numpy matplotlib scikit-learn-
Install TensorFlow as per instructions for your platform.
-
Run notebook:
jupyter notebook tensorboard_basics.ipynbIf you have trouble getting TensorFlow to work, hit the launch binder badge to run in the cloud. Note that this is an experimental feature.
Follow the notebook to build a neural network and train it. During training, make sure events are logged using tf.summary.FileWriter (code included in demo). Then run TensorBoard, pointing it to the log directory:
tensorboard --logdir=logsAnd then open the URL that gets printed, in your browser (typically: http://0.0.0.0:6006).
Explore the structure of the neural network in the Graph tab, and the summaries you reported in the Events tab.