You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a problem when reading an ONNX model and performing inference. I used gorgonnx as the backend and put it into the model for creation. Then, I performed setInput on the model. A total of three tensors are required, but when executing, an error is reported saying "Operator Shape not implemented". If I'm not mistaken, the Shape operator should have been implemented. But why is this error still reported?
Here is my code
`// Create a backend receiver
backend := gorgonnx.NewGraph()
// Create a model and set the execution backend
model := onnx.NewModel(backend)
f, err := os.ReadFile("onnx/model1.onnx")
if err != nil {
log.Fatalf("【ERROR】read .onnx file error[%v]", err)
}
if err = model.UnmarshalBinary(f); err != nil {
log.Fatalf("【ERROR】model unmarshal to binary error[%v]", err)
}
model.SetInput(0, inputs["input_ids"])
model.SetInput(1, inputs["token_type_ids"])
model.SetInput(2, inputs["attention_mask"])
err = backend.Run()
if err != nil {
log.Fatalf("【ERROR】backend run error[%v]", err)
}`
Very simple, but i really dont know why this error occured 2024/09/12 16:10:05 【ERROR】backend run error[onnx: operator Shape not implemented ()]
The text was updated successfully, but these errors were encountered:
I encountered a problem when reading an ONNX model and performing inference. I used gorgonnx as the backend and put it into the model for creation. Then, I performed setInput on the model. A total of three tensors are required, but when executing, an error is reported saying "Operator Shape not implemented". If I'm not mistaken, the Shape operator should have been implemented. But why is this error still reported?
Here is my code
`// Create a backend receiver
backend := gorgonnx.NewGraph()
// Create a model and set the execution backend
model := onnx.NewModel(backend)
Very simple, but i really dont know why this error occured
2024/09/12 16:10:05 【ERROR】backend run error[onnx: operator Shape not implemented ()]
The text was updated successfully, but these errors were encountered: