Skip to content

A bug in the model RoBERTa #351

@joddiy

Description

@joddiy

Bug Report

Which model does this pertain to?

Text model, RoBERTa

Describe the bug

I try to run this model in the onnx runtime, it reports the following error:

6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Expand node. Name:'' Status Message: /Users/runner/work/1/s/onnxruntime/core/providers/cpu/math/element_wise_ops.h:361 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. 7 by 13

It seems in the model, for the expand operator in the following picture, it has an input with shape 1*13, but the new_shape of the operator comes from the input text sequence, its shape is 1*7 for the input "This film is so good". The 1*13 input cannot expand to the new_shape of 1*7.

image

Reproduction instructions

System Information

OS Platform and Distribution (e.g. Linux Ubuntu 16.04): MacOS 10.15.6
ONNX version (e.g. 1.6): 1.6
Backend/Runtime version (e.g. ONNX Runtime 1.1, PyTorch 1.2): ONNX Runtime 1.4.0

Provide a code snippet to reproduce your errors.
Just run the demo code in https://github.com/onnx/models/blob/master/text/machine_comprehension/roberta/dependencies/roberta-sequence-classification-inference.ipynb

Notes

Any additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions