Image Classification Demo — 2015 vs 2025
画像分類デモ — 2015 vs 2025 実装比較
The same feature (image → category prediction) compared across two generations of implementation.
同じ機能(画像 → カテゴリ予測)を 2 世代の実装で比較する。
Inference is handled by the 2025 implementation (ViT).
推論は 2025 実装(ViT)が担います。
Code Implementation Comparison
実装コードの比較
Difference in lines of code required to implement the same inference feature. 同じ推論機能を実装するのに必要なコード量の差
Implementation Comparison Summary
実装比較サマリー
| Item 項目 |
2015 (Theano) | 2025 (HuggingFace) |
|---|---|---|
| Lines of code 実装行数 |
~130 lines | 5 lines |
| Model モデル |
Hand-written CNN 手書き CNN |
ViT-Base (pre-trained) ViT-Base(事前学習済) |
| Preprocessing 前処理 |
Manual 手動実装 |
Automatic 自動 |
| Training 学習 |
SGD written by hand SGD 手動記述 |
Not required (fine-tuning is separate) 不要(Fine-tuning は別途) |
| Accuracy (approx.) 精度目安 |
~70 % (CIFAR-10) | ~81 % (ImageNet) |
| Theano compile step コンパイル |
Tens of seconds 数十秒 |
Not required 不要 |