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
Hello, I'm using my own model and I faced the follow issue while running -> Failed to infer shape. Op: A × Bᵀ: Inner dimensions do not match up
This is the model shape -> (1, 3, 50, 50)
and the error appear when PopulateExprgraph is called
Down bellow is the code
if_, err:=os.Stat(modelfalepath); err!=nil&&os.IsNotExist(err) {
//log.Fatalf("%v does not exist", *model)//trhow an decent error
}
// Create a backend receiverbackend:=gorgonnx.NewGraph()
// Create a model and set the execution backendm:=onnx.NewModel(backend)
// read the onnx modelb, err:=ioutil.ReadFile(modelfalepath)
iferr!=nil {
log.Fatal(err)
}
// Decode it into the modelerr=m.UnmarshalBinary(b)
iferr!=nil {
log.Fatal(err)
}
m.SetInput(0, toTensor(img))
// here is the error// if I take this if off the error will be displyed on backend.runfmt.Print("\n PopulateExprgraph:", backend.PopulateExprgraph())
err=backend.Run()
iferr!=nil {
log.Fatal(err)
}
//m.GetOutputTensors()
fmt.Print(m.GetOutputTensors())```
There is an way to check in backend the expected shape(or dimension) ?
Cheers for the project is amazing!
Edit:
I found and corrected this error, I had my ONNX in the following format NHWC and this codes expect NCHW (it could be nice if someone implement a flag for that).
But now I face the following probrem -> onnx: operator ReduceMean not implemented ()
The text was updated successfully, but these errors were encountered:
Hello, I'm using my own model and I faced the follow issue while running ->
Failed to infer shape. Op: A × Bᵀ: Inner dimensions do not match up
This is the model shape -> (1, 3, 50, 50)
and the error appear when
PopulateExprgraph
is calledDown bellow is the code
The text was updated successfully, but these errors were encountered: