user3413491
user3413491

Reputation: 31

ONNX model with sub operator error does not bind

I am trying to create a session with a squeezenet ONNX model using: session = winrt::Windows::AI::MachineLearning::LearningModelSession{ model, winrt::Windows::AI::MachineLearning::LearningModelDevice(deviceKind) };

I have two versions of squeezenet. One has a 'Sub' layer at the beginning, and the other does not. The one with 'Sub' throws an error when the above is executed.

Any ideas what is happening here?

Upvotes: 1

Views: 359

Answers (2)

Paul McDaniel
Paul McDaniel

Reputation: 1721

What is the shape of the input for the squeezenet that is failing? If you post the failing model we can help you troubleshoot it.

2 key things to make it work for OS build 17763:

  1. Make sure you are using ONNX versions 1.2 (opset 7)
  2. Make sure your input has the right shape that the model is expecting.

What error are you getting when you create the LearningModelSession ?

Upvotes: 3

Young Kim
Young Kim

Reputation: 41

The existence of 'Sub' operator in ONNX graph should not affect whether or not you can run that model on Windows. I think the more important question is the ONNX version (or the operator set version) and the target Windows version. Starting in October 2018 update, windows machine learning will be compatible with ONNX version 1.2.2 (https://github.com/onnx/onnx/releases/tag/v1.2.2). Double check if you have the model 1.2.2 and October 2018 update SDK (10.0.17763.x)

Upvotes: 1

Related Questions