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

Persist classes from parents in subclasses #701

Merged
merged 4 commits into from Oct 5, 2021

Conversation

dfalbel
Copy link
Member

@dfalbel dfalbel commented Oct 1, 2021

Allows persisting the inherited classes. It's expected that subclasses also inherits the classes from their parents.
Fix #700

This is specially useful when inheriting from nn_sequential, allowed by #699 . Since nn_sequential implements other methods for the module, eg [, and length.

Merge after #699

…s also inherits the classes from their parents.
@dfalbel dfalbel requested a review from skeydan October 1, 2021 19:44
Copy link
Collaborator

@skeydan skeydan left a comment

Choose a reason for hiding this comment

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

LGTM!

Merge branch 'master' of https://github.com/mlverse/torch into feature/persist-inherited-classes
@dfalbel dfalbel merged commit e4117a2 into master Oct 5, 2021
@dfalbel dfalbel deleted the feature/persist-inherited-classes branch October 5, 2021 00:47
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.

nn_module inheritance should keep inherit class
2 participants