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

Simplify Architectures and add thin wrapper for arbitrary modules #359

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

pattonw
Copy link
Contributor

@pattonw pattonw commented Jan 2, 2025

Simplified Architectures by turning the ArchitectureConfig + Architecture combo into just ArchitectureConfig with a .module method that returns the plain torch module.
Everything we need on top of the torch.nn.module is provided by the ArchitectureConfig. I.e. input_shape, num_in_channels, num_out_channels etc.
If someone else wants to use the model its as simple as just calling .module to get a pure torch module.

Adds support for a WrappedArchitectureConfig that takes as one of its arguments a torch.nn.Module. Note that we cannot support serializing this config to file or database since it contains a full torch.nn.Module instance.

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.

1 participant