zoukankan      html  css  js  c++  java
  • python -m onnxsim 报错:RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION ,UpsampleMode) const scale >= 1 was false. Scale value should be greater than or equal to 1.

    RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Exception during initialization: /Users/runner/work/1/s/onnxruntime/core/providers/cpu/tensor/upsample.h:271 void onnxruntime::UpsampleBase::ScalesValidation(const std::vector<float> &, const onnxruntime::UpsampleMode) const scale >= 1 was false. Scale value should be greater than or equal to 1.


    原因是在
    torch.onnx.export 的时候没有配置opset_version参数,默认是9,如果pytorch >=1.3.0,可以配置成11,否则配置成10
    详细见:
    https://github.com/microsoft/onnxruntime/issues/5548
    #=======
    @hariharans29 Thank you for your reply, I re-generated the onnx file. The above mentioned problem happens with opset=9, but when setting opset=10, everything goes on well as expected.
  • 相关阅读:
    ES6相关概念及新增语法
    正则表达式
    递归
    高阶函数和闭包
    严格模式
    this指向
    递归
    严格模式
    函数内部的this指向
    函数的定义和调用
  • 原文地址:https://www.cnblogs.com/YouXiangLiThon/p/14412521.html
Copyright © 2011-2022 走看看