Hi,
A model instance/object has to be initialized before we can load the model weight values to the object from a file if I understand correctly. Let me know if I am mistaken.
If I used a UNet, for example, where the only variable initialization parameters (used to initialize a UNet instance) are the number of feature planes/channels for each “depth” level, would there be a way to pull that information from a saved file prior to loading so I could “dynamically” initialize a UNet object that will have a valid structure for storing the data from the saved file ?
One workaround would be to create a custom file format that will contain both the model and initialization parameter values but I’d rather extract that info from the Pytorch’s file format directly if possible.
Thanks