Skip to content
Branch: master
Find file History
Latest commit 234745e Nov 1, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
code README update Oct 31, 2018


Welcome to TensorFlow World

This document is dedicated to explain how to run the python script for this tutorial.

Test TensorFlow Environment

WARNING: If TensorFlow is installed in any environment(virtual environment, ...), it must be activated at first. So at first make sure the tensorFlow is available in the current environment using the following script:

cd code/

How to run the code in Terminal?

Please root to the code/ directory and run the python script as the general form of below:

python [] --log_dir='absolute/path/to/log_dir'

As an example the code can be executed as follows:

python --log_dir='~/log_dir'

The --log_dir flag is to provide the address which the event files (for visualizing in Tensorboard) will be saved. The flag of --log_dir is not required because its default value is available in the source code as follows:
'log_dir', os.path.dirname(os.path.abspath(__file__)) + '/logs',
'Directory where event logs are written to.')

How to run the code in IDEs?

Since the code is ready-to-go, as long as the TensorFlow can be called in the IDE editor(Pycharm, Spyder,..), the code can be executed successfully.

How to run the Tensorboard?

TensorBoard is the graph visualization tools provided by TensorFlow. Using Google’s words: “The computations you'll use TensorFlow for - like training a massive deep neural network - can be complex and confusing. To make it easier to understand, debug, and optimize TensorFlow programs, we've included a suite of visualization tools called TensorBoard.”

The Tensorboard can be run as follows in the terminal:

tensorboard --logdir="absolute/path/to/log_dir"
You can’t perform that action at this time.