【问题标题】:Onnx 'helper' and 'checker' attribute are not definedOnnx 'helper' 和 'checker' 属性未定义
【发布时间】:2018-02-08 17:55:25
【问题描述】:

我的 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.checker 或 onnx.helper 属性。当我尝试使用它们时,我收到以下错误 -

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.helper 时遇到同样的错误。我在这里做错了什么?

【问题讨论】:

    标签: deep-learning protocol-buffers caffe2 onnx


    【解决方案1】:

    问题是onnx版本,旧版本有错误。使用 onnx >= 1.0.0 有效

    运行以下工作 - git clone --recursive https://github.com/onnx/onnx.git MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-07
      相关资源
      最近更新 更多