代码之家  ›  专栏  ›  技术社区  ›  anirudh

未定义Onnx“helper”和“checker”属性

  •  0
  • anirudh  · 技术社区  · 7 年前

    我的conda虚拟环境中安装了onnx 0.2.1

    conda list | grep onnx
    
    packages in environment at /Users/aanirud/anaconda2/envs/onnx:
    onnx 0.2.1 py27_1 ezyang
    onnx-caffe2 0.2.1 py27hbe716ef_1 ezyang
    onnx-mxnet 0.4.1
    

    但是我不能使用onnx。棋盘格或onnx。辅助对象属性。当我尝试使用它们时,会出现以下错误-

    import onnx
    onnx.checker.check_model("toy_model.onnx")
    Traceback (most recent call last):
    File "", line 1, in 
    AttributeError: 'module' object has no attribute 'checker'
    

    当我尝试使用onnx时,会出现同样的错误。帮手我做错了什么?

    1 回复  |  直到 6 年前
        1
  •  0
  •   anirudh    7 年前

    问题是onnx版本,旧版本中有一个bug。使用onnx>=1.0.0工程

    运行以下工作- git克隆--递归 https://github.com/onnx/onnx.git MACOSX\u DEPLOYMENT\u TARGET=10.9 CC=clang CXX=clang++python安装程序。py安装

    推荐文章