Add tensor support

- There is now a wrapper to create generic Tensor objects in Go, that
   should be appropriately backed by the onnxruntime.

 - Did some minor tests.

 - Still to do: update the example, and put together a nice API that
   uses the tensors.
This commit is contained in:
yalue
2023-02-01 19:47:53 -05:00
parent a8e06273d0
commit ff910beb76
7 changed files with 359 additions and 33 deletions

View File

@@ -13,7 +13,11 @@ func run() int {
if runtime.GOOS == "windows" {
onnxruntime.SetSharedLibraryPath("../test_data/onnxruntime.dll")
} else {
onnxruntime.SetSharedLibraryPath("../test_data/onnxruntime.so")
if runtime.GOARCH == "arm64" {
onnxruntime.SetSharedLibraryPath("../test_data/onnxruntime_arm64.so")
} else {
onnxruntime.SetSharedLibraryPath("../test_data/onnxruntime.so")
}
}
e := onnxruntime.InitializeEnvironment()
if e != nil {