Skip to content

ModelAssembler, torchModel and saving/loading of parameters #15

Description

@PeterCalifano

SaveTorchModel function has troubles in saving traced models when the latter is composed by multiple piece stacked through nn.Sequential. Furthermore, this method is not able to move all modules to the target device and requires .to() method to be overridden and explicitly called on some parts. This is also indicated by torchsummary, which does not see details of one of the modules. Activities to perform:

  • Investigate issue of tracing models composed of multiple modules.
  • Investigate issue of .to() method trying alternative stacking other than nn.Sequential.
  • From task 2, define ModelAssembler as class to produce assembly of models (does not need to be too flexible for now) or to be used directly as nn.Module itself.
  • Define ways to load or extract subsets of model from ModelAssembler to improve flexibility and saving of experiments.
  • From task 1 and 2, define torchModel wrapper providing overriding of necessary methods (e.g. to()) to handle tracing, reloading and full compatibility with torch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions