Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can this be used to perform neural network inference, such as utilizing the MNIST dataset? #64

Open
loloxwg opened this issue Jan 2, 2025 · 2 comments

Comments

@loloxwg
Copy link

loloxwg commented Jan 2, 2025

Can this be used to perform neural network inference, such as utilizing the MNIST dataset? (https://pytorch.org/vision/0.20/generated/torchvision.datasets.MNIST.html)

@loloxwg
Copy link
Author

loloxwg commented Jan 9, 2025

After several days of research, I have started to learn from scratch as someone who knows nothing about deep learning.I now know that I can do this kind of reasoning.
When exploring the implementation of deep learning frameworks in Rust, such as Candle and Burn, it raises the question of whether using these Rust-based frameworks could be a better alternative to ONNX Runtime for building projects like SurealML.
burn
candle

@maxwellflitton
Copy link
Contributor

SurrealML essentially gets trained models and converts them to models with meta data around the model. This enables the database or surrealML engine to run the model with some inputs. What this means is that you train your models however you want. ONNX is the universal agreed upon format that is essentially protobuf describing the weights and computation graph to execute inference of the model. We then have an ONNX inference engine in Rust that works in the database, but it also keeps your model portable. For instance, there are projects working on making ONNX WASM compatible so it can be run in the browser. If we look we are working on a c-wrapper for the core module here:

https://github.com/surrealdb/surrealml/tree/refactor/modules/c-wrapper

this means we can load and interact with the raw C interface for python below:

https://github.com/surrealdb/surrealml/blob/refactor/clients/python/surrealml/rust_adapter.py

but this approach also enables us to build clients in languages such as JavaScript by interacting with the c-wrapper via FFI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants