XLNet conversion to onnx

I’m trying to run text classification inference on a XLNet model using onnx, but when trying to run the inference I’m getting the following error:

onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Add node. Name:‘Add_26’ Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/math/element_wise_ops.h:475 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. 6 by 48

Any clue about it?

Thanks in advance for your help!

Hi @uyjco0

Something seems to be running wrong when you’re trying to export to ONNX.

How did you extract your ONNX graph ?
Are you sure about the tensors you’re feeding your session ?

Without a little more information it’s hard to give you more feedback than what google will.
Cheers,