Currently I can run through my tensorflow graph correctly, but the running time is longer than my expectation, so I'd like to know how to profile execution time for each node in the graph.
Asked
Active
Viewed 931 times
2
-
Possible duplicate of [Can I measure the execution time of individual operations with TensorFlow?](https://stackoverflow.com/questions/34293714/can-i-measure-the-execution-time-of-individual-operations-with-tensorflow) – benjaminplanche Apr 05 '18 at 08:17
1 Answers
0
You could probably use fields recorded in step_stats. TimelineTest shows an example of how to get stats about execution.

fandrianto
- 31
- 3
-
encounter this error `ImportError: cannot import name timeline`, info about my tensorflow package `v0.7.1/CPU` – Yuwen Yan Apr 06 '16 at 00:59
-
The timeline code is only supported in the latest nightly builds or if you build from source. It will be in the 0.8 release. – mrry Apr 06 '16 at 01:05
-
thanks @mrry , I just download the latest build from `http://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_CONTAINER_TYPE=CPU,TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-0.7.1-cp27-none-linux_x86_64.whl`, and install it with `pip install tensorflow-0.7.1-cp27-none-linux_x86_64.whl `, but it failed with error `tensorflow-0.7.1-cp27-none-linux_x86_64.whl is not a supported wheel on this platform.` – Yuwen Yan Apr 06 '16 at 01:33
-
-
@mrry very sorry for the mistake, I'm running on MacOS with Python 2.7. – Yuwen Yan Apr 06 '16 at 02:30
-
-
@mrry looks the interface of some functions changed in 0.8 release, need lots of fixes :( – Yuwen Yan Apr 06 '16 at 04:44