728x90
반응형
1. time
import time
start = time.time()
(code)
print("time :", time.time() - start)
------------------------------------------------------------------------
time : 59.317203998565674
2. time, numpy(round())
import time
import numpy as np
start = time.time()
(code)
print("time :", np.round(time.time() - start), "(s)")
------------------------------------------------------------------------
time : 59.0 (s)
or
print("time :", np.round(time.time() - start, 2), "(s)")
------------------------------------------------------------------------
time : 59.32 (s)
728x90
반응형
'개발 > Python' 카테고리의 다른 글
PyTorch CPU version install (Windows / Linux) (PIP / Anaconda) (0) | 2021.06.18 |
---|---|
ImportError: ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.') (0) | 2021.06.15 |
Anaconda3 Update (0) | 2021.06.09 |
파이썬 가상 환경 만들기 (0) | 2021.06.01 |
python code style check (pycodestyle) (0) | 2021.05.31 |