Commit Graph

8 Commits

Author SHA1 Message Date
yalue
ca658dac00 Check for valid shapes more thoroughly
- This change adds several more detailed error types that may be
   returned when attempting to work with shapes that are invalid for
   some reason.

 - Added the Shape.Validate() function, which may be called by users,
   but is internally called when creating new tensors.
2023-05-11 10:11:39 -04:00
Nathan
33ddad1553 Implement Tensor.Clone
- Take care of an easy TODO.

 - Also added a Shape.Equals function, to compare two shapes.
2023-02-24 08:34:52 -05:00
yalue
36dc614e49 Rename package to make it clear that this is Go
- I hate the convention of putting "go" on every library wrapper, but
   unfortunately the utility is undeniable.  I don't want people to find
   this repo when they are actually looking for the "real" onnxruntime
   repo.
2023-02-08 09:47:18 -05:00
yalue
bb5039f6ad Enable multiple inputs and outputs
- Modified the Session API so that the user must provide all input and
   output tensors when creating the session (Run() no longer takes any
   arguments).  This should avoid allocations and fix the incorrect way
   I was using input and output names before.

 - Updated the test to use the new API.

 - Removed the onnx_example_application; it was only doing the same
   thing as the unit test anyway.
2023-02-04 13:51:45 -05:00
yalue
e0cd5f977c Rename CleanupEnvironment -> DestroyEnvironment
- Named the cleanup function something more consistent with the other
   cleanup functions.

 - Fixed a couple bugs where deferred stuff was executed after the
   environment was destroyed, causing a segfault.
2023-02-04 12:41:35 -05:00
yalue
137ec8f64f Can now load and run a network
- The library is now capable of loading the test session and running
   it successfully.

 - Updated the example application, which is really the same as the test
   and should probably be deleted.

 - TODO: The input names actually *do* need to match the names when the
   network was created. The hardcoded names in onnxruntime_wrapper.c
   will *not* do!
2023-02-04 10:31:57 -05:00
yalue
ff910beb76 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.
2023-02-01 19:47:53 -05:00
yalue
75e3434f7e Initial commit
- Sets up the onnxruntime environment, but doesn't load or run networks
   yet.

 - The things builds and run on Windows.

 - Still working on getting the Linux (arm64 for now) test to work.
2023-01-28 13:49:33 -05:00