Conversation
6dd34d6 to
4c72f3b
Compare
…rainedModel` example
…dOnline` examples to use custom data loader for handling raw, compressed `.gz` data files
cc2eb42 to
c235044
Compare
glopesdev
reviewed
Apr 25, 2025
…ion-mnist" folder
…to the target folder correctly
…harp-cpu` dependency
…otstrapping environment with uv manager
ncguilbeault
commented
Apr 30, 2025
Collaborator
Author
ncguilbeault
left a comment
There was a problem hiding this comment.
Thanks for the feedback. I think I've addressed all of the comments from the previous review. Let me know what you think!
glopesdev
approved these changes
May 2, 2025
This was referenced Jun 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces new examples for the
Bonsai.ML.Torchpackage in bonsai-rx/machinelearning#48. A list of examples and brief summaries are provided below.Examples
Linear Regression
In this example, the
Bonsai.ML.Torchpackage is used to perform simple linear regression using the ordinary least squares method on simulated data.Neural Nets - Pretrained Model
This example shows how to run inference using a pretrained convolutional neural network to solve a typical image classification problem. The network is trained to categorize clothing items in the fashion-mnist dataset and perform online inference of new images that were not included in the training dataset. In this particular example, the pretrained weights of the model are loaded from disk.
Neural Nets - Torch Hub
This example shows how a PyTorch model can be downloaded from the PyTorch hub and used to run online inference in Bonsai. For this particular example, the MiDaS model is used to infer the relative inverse depth of images streamed from a camera.
Neural Nets - Training Online
This example shows how a convolutional neural network can be trained online to solve an image classification problem. It demonstrates a typical training procedure that involves performing SGD on the weights of the network as new images and labels are passed to the network. After a certain amount of training, the model can be switch to online inference only mode.
Running On Mono
This example demonstrates how to run the package on Mono. This currently requires a workaround to the DLL import which explicitly throws an error on non-windows OS's running .NET Framework (which is the case for Mono). See this issue: dotnet/TorchSharp#689.