☆☆☆☆☆ (0) Rate this solution
This document has instructions for running ResNet50* bfloat16 inference using Intel® Extension for PyTorch*.
The ImageNet validation dataset is used when testing accuracy. The inference scripts use synthetic data, so no dataset is needed.
The accuracy script looks for a folder named
val, so after running the data prep script, your folder structure should look something like this:
imagenet └── val ├── ILSVRC2012_img_val.tar ├── n01440764 │ ├── ILSVRC2012_val_00000293.JPEG │ ├── ILSVRC2012_val_00002138.JPEG │ ├── ILSVRC2012_val_00003014.JPEG │ ├── ILSVRC2012_val_00006697.JPEG │ └── ... └── ...
The folder that contains the
val directory should be set as the
DATASET_DIR when running accuracy (for example:
Quick Start Scripts
||Runs online inference using synthetic data (batch_size=1).|
||Runs batch inference using synthetic data (batch_size=128).|
||Measures the model accuracy (batch_size=128).|
To run on bare metal, the following prerequisites must be installed in your environment:
Download and untar the model package and then run a quick start script.
# Optional: to run accuracy script export DATASET_DIR=<path to the preprocessed imagenet dataset> # Download and extract the model package wget https://storage.googleapis.com/intel-optimized-tensorflow/models/v2_3_0/pytorch-resnet50-bfloat16-inference.tar.gz tar -xzf pytorch-resnet50-bfloat16-inference.tar.gz cd pytorch-resnet50-bfloat16-inference bash quickstart/<script name>.sh
Documentation and Sources
LEGAL NOTICE: By accessing, downloading or using this software and any required dependent software (the “Software Package”), you agree to the terms and conditions of the software license agreements for the Software Package, which may also include notices, disclaimers, or license terms for third party software included with the Software Package. Please refer to the license file for additional details.
Related Containers and Solutions
ResNet50* BFloat16 Inference TensorFlow* Container
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.