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())```Thereisanwaytocheckinbackendtheexpectedshape(ordimension) ?
Cheersfortheprojectisamazing!Edit:
Ifoundandcorrectedthiserror, IhadmyONNXinthefollowingformatNHWCandthiscodesexpectNCHW (itcouldbeniceifsomeoneimplementaflagforthat).
ButnowIfacethefollowingprobrem->onnx: operatorReduceMeannotimplemented ()
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: