2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

python > 処理時間計測 > time.time() - start_time

Last updated at Posted at 2016-10-10
動作環境
Ubuntu 14.04 LTS desktop amd64
GeForce GTX 750 Ti
ASRock Z170M Pro4S [Intel Z170chipset]
TensorFlow v0.11
cuDNN v5.1 for Linux
CUDA v7.5
Python 2.7.6

TensorFlowという仕組みを使ったクラス識別の処理を学習中。

こちらを勉強中。
http://blog.brainpad.co.jp/entry/2016/03/28/170000

fully_connected_feed.py
において、処理の速さを測る方法としてtime.time()を使っている。

import time

...
      start_time = time.time()

      # 何かの処理

      duration = time.time() - start_time

      print('Step %d: loss = %.2f (%.3f sec)' % (step, loss_value, duration))

秒単位のようだ。

2
3
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?