zwacke:

Is there no way to make it work in a way that pytorch models can be saved as they are and reused as they are?


You could script the model and export it so that it’ll be usable in standalone applications (e.g. in C++).
However, that wouldn’t store the source code of the model, which would be needed for further experiments.
You could try to use the patch tool via:
torch.nn.Module.dump_patches = True
model=torch.load("mymodel.model")

which should create patch files with the diffs. I’ve never used it before, so I’m not sure, how easy it would be to restore your code.