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

Added custom model example #83

Merged
merged 2 commits into from
Jul 17, 2022
Merged

Added custom model example #83

merged 2 commits into from
Jul 17, 2022

Conversation

jafioti
Copy link
Contributor

@jafioti jafioti commented Jul 14, 2022

I think it's important to show how to build a custom module that implements custom functionality so I took the mnist example and created a custom MLP struct. Obviously this is a trivial scenario, but it demonstrates how to use the traits to implement a new module for both single and batch forward functions.

@coreylowman
Copy link
Owner

Good idea! I'm thinking this example could just be the custom model definition and then in main call forward with single & batched tensor. Thoughts? Thinking that including all the mnist stuff just detracts from the example!

Copy link
Owner

@coreylowman coreylowman left a comment

Choose a reason for hiding this comment

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

Yeah I definitely want to merge this in, but let's reduce it a bit to make it as clear as possible! Let me know if you aren't planning on updating and I can take this over.

@jafioti
Copy link
Contributor Author

jafioti commented Jul 15, 2022

Sounds good, I'll reduce it down to just the core example later today.

@jafioti
Copy link
Contributor Author

jafioti commented Jul 16, 2022

Alright I simplified the example to just a single forward and batched forward. Let me know what you think.

Copy link
Owner

@coreylowman coreylowman left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for the contribution 🎉

@coreylowman coreylowman merged commit 2add31a into coreylowman:main Jul 17, 2022
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.

None yet

2 participants