Skip to main content

Vision

В этом разделе тестировать производительность TPU для задач Computer Vision

ResNet 50

Обзор

ResNet-50 is a 50-layer convolutional neural network (CNN) introduced in 2015 that revolutionized computer vision by using residual (skip) connections to solve the vanishing gradient problem in deep networks. Widely used for image classification, it acts as a backbone for object detection and image segmentation tasks, often pre-trained on the ImageNet dataset

Key Features and Architecture

Structure: It consists of 48 Convolutional layers, 1 Average Pool layer, and 1 Fully Connected layer.

Residual Learning: Instead of learning direct mappings, blocks learn residuals (deviations), allowing for easier optimization of deep networks.

Performance: Achieves roughly 80.86% top-1 accuracy on ImageNet-1K.

Input Size: Primarily designed for pixel images.

Конфигурация TPU

  • host ISA: RISC-V
  • host architecture: Canaveral
  • CPU/Tensor cores: 1/1
  • process: 130nm, hd cells
  • clock freq, MHz: 400
  • clock period, ns: 2.5
  • Runtime: ONNX C++
  • input image source: ImageNet
  • input image dimension: 224x224x3

Результаты - Inference

  • MXU: 16x16
  • batch size: 1
  • total cycles: 297272758
  • P99, s: 0.743

По результатам тестирования инференса для ResNet 50 и batch = 1, получаем инференс в для распределения 99% за 0.743 секунды

Отметим, что размер Tensor Core был уменьшен с 128x128 до 16x16, т.к нет возможности симулировать Tencor Cores большого размера

Результаты - Training

  • MXU - 8x8
  • batch: 20
  • training batch: 10
  • testing batch: 10
  • throughput: 0.018 fps

В этом тесте мы применили методику тестирования без validation set для уменьшения времени симуляции.

Tensor Core был уменьшен с 128x128 до 8x8 по тем же причинам.

Результат - 0.018 fps на ImageNet batch 20