google Colaboratory 예제 코드, GPU 사용 코드 예제

CODEDRAGON Development/Python

반응형


 

google Colaboratory 예제 코드

https://colab.research.google.com

https://colab.research.google.com/notebooks/welcome.ipynb

Hello,_Colaboratory.ipynb


 

로그인 하지 않으면 코드를 실행할 없습니다.


 

사용하기 위해서 우측의 연결을 클릭하여 연결됨 사용로 만든 사용하면 됩니다.


 

 

 

 

GPU 사용 코드 예제

CPU GPU 실행했을 때의 시간을 확인할 파이썬 코드입니다.

https://colab.research.google.com/notebooks/gpu.ipynb


TensorFlow_with_GPU.ipynb


 

CPU GPU 실행했을 때의 시간을 확인할 있습니다.

Time (s) to convolve 32x7x7x3 filter over random 100x100x100x3 images (batch x height x width x channel). Sum of ten runs.

CPU (s):

9.52779817581

GPU (s):

0.880604982376

GPU speedup over CPU: 10x

결과를 보면

10배정도 차이가 나는 것을 확인할 있습니다.

 


반응형