第4章分類のための線形ニューラルネットワーク
4.2. The Image Classification Dataset4.2 画像分類のデータセット
One widely used dataset for image classification is the MNIST dataset (LeCun et al., 1998) of handwritten digits. At the time of its release in the 1990s it posed a formidable challenge to most machine learning algorithms, consisting of 60,000 images of pixels resolution (plus a test dataset of 10,000 images). To put things into perspective, back in 1995, a Sun SPARCStation 5 with a whopping 64MB of RAM and a blistering 5 MFLOPs was considered state of the art equipment for machine learning at AT&T Bell Laboratories. Achieving high accuracy on digit recognition was a key component in automating letter sorting for the USPS in the 1990s. Deep networks such as LeNet-5 (LeCun et al., 1995), support vector machines with invariances (Schölkopf et al., 1996), and tangent distance classifiers (Simard et al., 1998) all could reach error rates below 1%.
英語のヒント
画像分類で広く使われているデータセットの一つに、手書き数字のMNISTデータセット(LeCun et al., 1998)がある。1990年代に公開された当時、これはほとんどの機械学習アルゴリズムにとって手ごわい課題だった。解像度画素の画像60,000枚(に加えて10,000枚のテスト用の画像)からなっていたのである。比較のために言えば、1995年当時、AT&Tベル研究所では、RAMがなんと64MBで、5 MFLOPsという猛烈な速さのSun SPARCStation 5が、機械学習のための最先端の機材とされていた。数字の認識で高い正解率を達成することは、1990年代に米国郵便公社(USPS)で手紙の仕分けを自動化するうえで鍵となる要素だった。LeNet-5(LeCun et al., 1995)のような深いネットワーク、不変性を組み込んだサポートベクターマシン(Schölkopf et al., 1996)、接距離分類器(Simard et al., 1998)は、いずれも1%未満の誤り率に達することができた。
For over a decade, MNIST served as the point of reference for comparing machine learning algorithms. While it had a good run as a benchmark dataset, even simple models by today’s standards achieve classification accuracy over 95%, making it unsuitable for distinguishing between strong models and weaker ones. Even more, the dataset allows for very high levels of accuracy, not typically seen in many classification problems. This skewed algorithmic development towards specific families of algorithms that can take advantage of clean datasets, such as active set methods and boundary-seeking active set algorithms. Today, MNIST serves as more of a sanity check than as a benchmark. ImageNet (Deng et al., 2009) poses a much more relevant challenge. Unfortunately, ImageNet is too large for many of the examples and illustrations in this book, as it would take too long to train to make the examples interactive. As a substitute we will focus our discussion in the coming sections on the qualitatively similar, but much smaller Fashion-MNIST dataset (Xiao et al., 2017) which was released in 2017. It contains images of 10 categories of clothing at pixels resolution.
英語のヒント
10年以上にわたって、MNISTは機械学習アルゴリズムを比べるための、まさに基準点だった。ベンチマーク用のデータセットとして長く活躍したが、今日の基準では単純なモデルでさえ95%を超える分類の正解率を達成するので、強いモデルと弱いモデルを見分けるのには向かなくなった。さらに、このデータセットでは非常に高い水準の正解率が可能で、これは多くの分類問題ではふつう見られない。このため、アルゴリズムの開発は、能動集合法や境界を探す能動集合アルゴリズムのような、きれいなデータセットをうまく利用できる特定のアルゴリズムの族へと偏った。今日では、MNISTはベンチマークというより、正常に動くかを確かめるために使われている。ImageNet(Deng et al., 2009)は、はるかに意味のある課題を突きつける。残念ながら、ImageNetはこの本の例や図解の多くには大きすぎる。訓練に時間がかかりすぎて、例を対話的に動かせなくなるからである。代わりに、以降の節では、質的には似ているがはるかに小さいFashion-MNISTデータセット(Xiao et al., 2017)に話を絞る。これは2017年に公開された。衣類の10カテゴリーの画像を、解像度画素で収めている。
%matplotlib inline
import time
import torch
import torchvision
from torchvision import transforms
from d2l import torch as d2l
d2l.use_svg_display()