Skip to content

Latest commit

 

History

History
80 lines (50 loc) · 2.28 KB

runexample-migraphx.md

File metadata and controls

80 lines (50 loc) · 2.28 KB

Unified Inference Frontend (UIF) 1.2 User Guide

Step 3.3: Run a MIGraphX Example

Table of Contents

3.3.1: Sample Run with MIGraphX

This repo also contains a sample to run a demo application with MIGraphX. The demo loads a single image, infers on the image using an Imagenet trained model, and prints out the Top1 class.

3.3.1.1: Preparation

  1. Run the following command to install OpenCV used by the sample:
pip install opencv-python

3.3.1.2: Run Sample

  1. To run the sample, change the directory to the samples/migraphx directory. Use the following command with the correct parameters:
python migx_sample.py \
    --onnx_file <onnx_file> \
    --image <image_file>

3.3.1.3: Parameter Descriptions

                              --onnx_file:         name of an imagenet ONNX model file
                              --mxr_file:           name of an MIGraphX YModel file
                              --image:               name of input image file

Note: Either the --onnx_file or --mxr_file options should be given.

3.3.1.4: Example

python migx_sample.py --onnx resnet50_fp32.onnx --image cow.jpg

< Previous | Next >


License

UIF is licensed under Apache License Version 2.0. Refer to the LICENSE file for the full license text and copyright notice.

Technical Support

Contact uif_support@amd.com for questions, issues, and feedback on UIF.

Submit your questions, feature requests, and bug reports on the GitHub issues page.