LoginSignup
2
0

More than 5 years have passed since last update.

Google ColaboratoryのGPU速度比較メモ

Posted at

Google ColaboratoryのGPU(K80)の速度はどんなものかとKerasのmnistにて、ローカルマシンのGPU(Taitan X, GTX 1070)と比較したメモです。

テスト方法

  • GitHubよりKeras のmnistサンプルをColaboratoryのローカルにダウンロード
import urllib

url  = "https://raw.githubusercontent.com/keras-team/keras/master/examples/mnist_mlp.py" 
urllib.request.urlretrieve(url,'./mnist_mlp.py')

url  = "https://raw.githubusercontent.com/keras-team/keras/master/examples/mnist_cnn.py" 
urllib.request.urlretrieve(url,'./mnist_cnn.py')
  • MLPでの実行時間を測定
%%time
%run -i mnist_mlp.py
  • CNNでの実行時間を測定
%%time
%run -i mnist_cnn.py

※1回目はデータのダウンロードがあるので、2回目以降でのテスト結果です。

結果

GPU MLP CNN
K80 (Google colaboratory) 80秒 129秒
Titan X Maxwell(ローカルマシン) 58秒 79秒
GTX 1070(ローカルマシン) 47秒 79秒
2
0
0

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
0