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 have an onnx model that expects input in the shape (B, C, S), where S is signal. E.g., (1, 1, 350). When I try to initialize this based on the demo (code shown below), I run into the error shown beneath the code. Is Conv1D not supported, or should I modify how I am setting up the input (which is currently tensor.New(tensor.WithShape(1, 1, signalLength), tensor.Of(tensor.Float32)))?
package main
import (
"fmt""log""os""github.com/owulveryck/onnx-go""github.com/owulveryck/onnx-go/backend/x/gorgonnx""gorgonia.org/tensor"
)
varsignalLength=350funcmain() {
// Create a backend receiverbackend:=gorgonnx.NewGraph()
// Create a model and set the execution backendmodel:=onnx.NewModel(backend)
// read the onnx modelb, _:=os.ReadFile("../model.pt.onnx")
// Decode it into the modelerr:=model.UnmarshalBinary(b)
iferr!=nil {
log.Fatal(err)
}
// Set the first input, the number depends of the modelinput:=tensor.New(tensor.WithShape(1, 1, signalLength), tensor.Of(tensor.Float32))
model.SetInput(0, input)
err=backend.Run()
iferr!=nil {
log.Fatal(err)
}
// Check erroroutput, _:=model.GetOutputTensors()
// write the first output to stdoutfmt.Println(output[0])
}
Error:
go run *.go
2023/08/27 14:22:30 conv: kernel shape is supposed to have a dim of 2
exit status 1
The text was updated successfully, but these errors were encountered:
I have an onnx model that expects input in the shape (B, C, S), where S is signal. E.g.,
(1, 1, 350)
. When I try to initialize this based on the demo (code shown below), I run into the error shown beneath the code. Is Conv1D not supported, or should I modify how I am setting up the input (which is currentlytensor.New(tensor.WithShape(1, 1, signalLength), tensor.Of(tensor.Float32))
)?Error:
The text was updated successfully, but these errors were encountered: