1 Star 0 Fork 11

我是城墟垣/TensorFlow-Course

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Welcome to TensorFlow World

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

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 [python_code_file.py] --log_dir='absolute/path/to/log_dir'

As an example the code can be executed as follows:

python 1-welcome.py --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:

tf.app.flags.DEFINE_string(
'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"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/williamzhu89/TensorFlow-Course.git
git@gitee.com:williamzhu89/TensorFlow-Course.git
williamzhu89
TensorFlow-Course
TensorFlow-Course
master

搜索帮助

371d5123 14472233 46e8bd33 14472233