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

feat: Allow partial execution of network #51

Merged
merged 18 commits into from
Feb 2, 2024

Conversation

retraigo
Copy link
Collaborator

@retraigo retraigo commented Jan 27, 2024

This PR adds the ability to execute a partial sequence of the network. This can be useful when designing models such as Autoencoders and GANs.

  • Allow partial execution of the network.
  • Add proper error handling for misconfiguration during partial execution (out-of-bound slicing, etc),
  • Write an example showcasing how to execute the network partially (Autoencoders?)

And...

  • Additionally added the ability to predict multiple input points in a single net.predict() call.

This is a breaking change for the predict() method. The following things are broken:

  • Existing Examples
  • GPU backend
  • WASM backend

This PR also fixes #38.

EDIT:

  • Rewrite every example to use new predict() format.
    • xor (all) (edit: skipping xor.ipynb for now)
    • linear
    • multiple-linear
    • binary
    • multiclass
    • text
    • filters
    • run
    • mnist-predict

@retraigo
Copy link
Collaborator Author

On the flip side, the last change I mentioned now requires rewriting every example to follow the new predict() format (eg. Using a tensor2D for XOR instead of tensor1D).

@retraigo
Copy link
Collaborator Author

I'm updating just the predict routine of the mnist example without disturbing the rest for now.

@retraigo
Copy link
Collaborator Author

The last commit fixes #38

@load1n9 load1n9 self-requested a review February 2, 2024 20:38
Copy link
Member

@load1n9 load1n9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@load1n9 load1n9 merged commit 4e73131 into denosaurs:main Feb 2, 2024
0 of 3 checks passed
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

Successfully merging this pull request may close these issues.

Unable to use more than 255 output neurons on the CPU backend
2 participants