microsoft / Windows-Machine-Learning

Samples and Tools for Windows ML.
https://docs.microsoft.com/en-us/windows/ai/
MIT License
1.03k stars 446 forks source link

Running on the Mask R Cnn ONNX Model results in "Unrecognized attribute: ceil_mode" #252

Closed Avrohom closed 4 years ago

Avrohom commented 5 years ago

I'm submitting a…

Bug report (I searched for similar issues and did not find one)

Current behavior

When running on the Mask RCNN model I get the following error output: Unrecognized attribute: ceil_mode

I have tried squeezenet and works fine.

Expected behavior

Well, to get results and no error outputs.

Minimal reproduction of the problem with instructions

WinMLRunner_v1.2.0.1\x64>winmlrunner -Input C:\Other\sample.jpg -folder "D:\Users\Avrohom\Documents\Visual Studio 2017\Projects\VS Object Detection\models\mask_rcnn"

Environment

Windows Build Number: Latest

App min and target version:

Windows 10 Desktop

Graphics Driver version:

DxDiag:

WinMLTools specific:

Visual Studio

riaz commented 5 years ago

The onnx model has to be using opset 7 i.e onnx 1.2.1/1.2/1.2.2 model. You can go to https://github.com/onnx/models and try the models that mention opset 7 / or onnx 1.2.1 or onnx 1.2 they should be working.

manuelrames commented 4 years ago

As far as I have seen there is no possibility of exporting the model using opset < 10 (Windows ML supports up to opset 8 in build 18362). Has anyone achieved inference of Mask R-CNN yet using Windows ML? I have been stuck with this for a week now and cannot find a suitable solution... Thanks!

aydtmiri commented 4 years ago

I have the same problem. Is there a way, to use the mask RCNN onnx with visual studio 2019?

martinb35 commented 4 years ago

hello, you can see what operator versions are supported where by using this table, which shows that operator version 10 is not yet supported in a released Windows OS. However, it is supported in the Windows Insider Program now. Additionally, you can also leverage the Microsoft.AI.MachineLearning NuGet package which supports operator set 10 already.

You can also change which version of operators you use by starting with the pytorch model and using torch.onnx.export while specifying the opset_version as seen here:

torch.onnx.export(InPlaceIndexedAssignment(), (data, new_data), 'inplace_assign.onnx', opset_version=11)