1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

NVIDIA L40S GPUのディープラーニング性能の測定

Posted at

はじめに

本記事では、NVIDIA L40S GPUが画像系ディープラーニングに対してどのくらいの性能を発揮するか実行速度を計測した結果を示します。評価対象は、画像分類モデルの学習及び推論速度、物体検出モデルの学習及び推論速度です。

目次

画像分類モデルの処理速度

データセット

データセットは、Cats and Dogs image classificationを使用しました。

学習用・テスト用それぞれで、クラス毎の画像枚数は以下の通りです。(クラスは 'dog', 'cat' の2クラス)

dog cat 画像枚数
学習用 278 279 557
テスト用 70 70 140

ベースモデル

画像分類モデルはTensorFlow v1のKeras APIを使用して作成し、ベースモデルはKerasの以下の3種類のpretrainedモデルを使用しました。

  • xception
  • inceptionv3
  • vgg19

学習処理時間

epoch=10, batch_size=16で学習したときの学習時間を以下に示します。今回は処理時間の測定が主目的のため、ハイパーパラメータのチューニングは特に行っていません。

ベースモデル 学習時間 1epoch当たりの学習時間
xception 1m21.964s 8.196s
inceptionv3 1m34.694s 9.469s
vgg19 54.982s 5.498s

推論処理時間

テスト画像を推論した際の処理時間を以下に示します。なお、1枚当たりの平均推論処理時間は最初の1枚目の推論時間を除く139枚のテスト画像の推論時間を平均した値となります。

ベースモデル 画像枚数 1枚当たりの平均推論時間 1秒当たりの平均処理画像数
xception 139 6.575 [ms] 152.082 [fps]
inceptionv3 139 7.977 [ms] 125.354 [fps]
vgg19 139 5.991 [ms] 166.915 [fps]

物体検出モデルの処理速度

データセット

データセットは、Fruit Images for Object Detectionを使用しました。

学習用・テスト用それぞれで、クラス毎のタグ数と画像枚数は以下の通りです。(クラスは 'apple', 'banana', 'orange' の3クラス)

apple banana orange 画像枚数
学習用 156 169 140 240
テスト用 35 40 42 60

ベースモデル

物体検出モデルはTensorFlow v1のObject Detection APIを使用して作成し、ベースモデルはModel Zooから以下の3種類のモデルを使用しました。

  • faster_rcnn_inception_v2_coco
  • faster_rcnn_resnet50_coco
  • ssd_resnet_50_fpn_coco

学習処理時間

epoch=200, batch_size=16で学習したときの学習時間を以下に示します。今回は処理時間の測定が主目的のため、ハイパーパラメータのチューニングは特に行っていません。

ベースモデル 学習時間 1epoch当たりの学習時間
faster_rcnn_inception_v2_coco 14m40.170s 4.401s
faster_rcnn_resnet50_coco 35m27.830s 10.639s
ssd_resnet_50_fpn_coco 25m59.613s 7.798s

推論処理時間

テスト画像を推論した際の処理時間を以下に示します。なお、1枚当たりの平均推論処理時間は最初の1枚目の推論時間を除く59枚のテスト画像の推論時間を平均した値となります。

ベースモデル 画像枚数 1枚当たりの平均推論時間 1秒当たりの平均処理画像数
faster_rcnn_inception_v2_coco 59 12.622 [ms] 79.227 [fps]
faster_rcnn_resnet50_coco 59 14.142 [ms] 70.710 [fps]
ssd_resnet_50_fpn_coco 59 9.797 [ms] 102.389 [fps]

まとめ

NVIDIA L40S GPUを使って、画像分類や物体検出の画像系ディープラーニングモデルの学習及び推論を実行した際の処理時間を計測した結果を示しました。
画像分類では、学習速度は1epoch当たり約5~10秒、推論速度は画像1枚当たり約6~8msec(120~170fps)を計測しました。また、物体検出モデルでは、学習速度は1epoch当たり約4~11秒、推論速度は画像1枚当たり約10~15msec(70~100fps)を計測しました。

参考文献

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?