Skip to content

[ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running PRelu node #3205

@cannguyen275

Description

@cannguyen275

Describe the bug
I'm trying to run a model, which is converted from Mxnet to ONNX.

Traceback (most recent call last):
  File "/home/my_project/recognize_onnx.py", line 31, in <module>
    out = ort_session.run([outputs], input_feed={input_name: input_blob})
  File "/home/miniconda3/envs/onnx13/lib/python3.7/site-packages/onnxruntime/capi/session.py", line 142, in run
    return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running PRelu node. Name:'conv_1_relu' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/math/element_wise_ops.h:339 void onnxruntime::BroadcastIterator::Init(int64_t, int64_t) axis == 1 || axis == largest was false. Attempting to broadcast an axis by a dimension other than 1. 56 by 64
Stacktrace:

. My script is:

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): 18.04
  • ONNX Runtime installed from (source or binary): binary
  • ONNX Runtime version: 1.1.2
  • Python version: 3.7

To Reproduce
You can get my model in link

predictor = onnx.load("mymodel.onnx")
print(onnx.checker.check_model(predictor))
ort_session = ort.InferenceSession(onnx_path)
input_name = ort_session.get_inputs()[0].name
outputs = ort_session.get_outputs()[0].name
img = cv2.imread("myImage.jpg")
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
img = cv2.resize(img, (112, 112))
aligned = np.transpose(img, (2, 0, 1))
input_blob = np.expand_dims(aligned, axis=0).astype(np.float32)
out = ort_session.run([outputs], input_feed={input_name: input_blob})

How can I fix this error? Any advices will be awesome!
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions