gorgonia / tensor

package tensor provides efficient and generic n-dimensional arrays in Go that are useful for machine learning and deep learning purposes
Apache License 2.0
359 stars 49 forks source link

cannot use b (type BLAS) as type "gorgonia.org/tensor" #115

Closed VITEK-THE-BEST closed 1 year ago

VITEK-THE-BEST commented 3 years ago

i am loading my model and i take this problem

` // Create a backend receiver backend := gorgonnx.NewGraph() // Create a model and set the execution backend model := onnx.NewModel(backend) // read the onnx model b, _ := ioutil.ReadFile("REDPropiaFinal.onnx")

err := model.UnmarshalBinary(b)
if err != nil {
    log.Fatal(err)
}`

and I get the following error

vendor/gorgonia.org/gorgonia/blas.go:46:12: cannot use b (type BLAS) as type "gorgonia.org/tensor".BLAS in argument to "gorgonia.org/tensor".Use: BLAS does not implement "gorgonia.org/tensor".BLAS (missing Caxpy method)

my go.mod file:

module workspace/keras go 1.16 require ( github.com/apache/arrow/go/arrow v0.0.0-20210716061910-93bdbf1df56f // indirect github.com/chewxy/math32 v1.0.8 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/owulveryck/onnx-go v0.5.0 gonum.org/v1/gonum v0.9.3 // indirect gorgonia.org/tensor v0.9.20 )

P.S. Sorry but it`s my first question in github

nathan-brainkey commented 1 year ago

I am running into a similar issue

nathan-brainkey commented 1 year ago

This can be fixed by updating Gorgonia to the latest version.