Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Failed to load Arcface from ONNX model zoo #19066

Open
@bfgoldstein

Description

Description

I was trying to load the Arcface model downloaded from ONNX model zoo, but a "NotImplementedError: Operator Sub not implemented." exception was raised.

It seems that this model had some problems before, but it was fixed here. However, there is a commit made on June 10 that removes support for some ONNX Operators, like add, subtract, multiply, and divide.

Error Message

[12:03:05] /home/bruno/mxnet/mxnet/src/storage/storage.cc:198: Using Pooled (Naive) StorageManager for CPU
Traceback (most recent call last):
  File "error_reproduce.py", line 5, in <module>
    sym, arg_params, aux_params = import_model(model)
  File "/home/bruno/mxnet/mxnet/python/mxnet/contrib/onnx/onnx2mx/import_model.py", line 59, in import_model
    sym, arg_params, aux_params = graph.from_onnx(model_proto.graph)
  File "/home/bruno/mxnet/mxnet/python/mxnet/contrib/onnx/onnx2mx/import_onnx.py", line 115, in from_onnx
    mxnet_sym = self._convert_operator(node_name, op_name, onnx_attr, inputs)
  File "/home/bruno/mxnet/mxnet/python/mxnet/contrib/onnx/onnx2mx/import_onnx.py", line 63, in _convert_operator
    raise NotImplementedError("Operator {} not implemented.".format(op_name))
NotImplementedError: Operator Sub not implemented.

To Reproduce

  • Download the model from ONNX model zoo. File arcfaceresnet100-8.onnx (git lfs);
  • Then run the python script below

Minimal python script:

import sys
from mxnet.contrib.onnx.onnx2mx.import_model import import_model

model = sys.argv[1]
sym, arg_params, aux_params = import_model(model)

Environment

  • OS: CentOS 8.2
  • Python: 3.7.7
  • ONNX: 1.7.0
  • MXNET: master (built from source)

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions