Easier method for model inference and deployment

I have been looking into ways to deploy and use models after they are trained. I originally started machine/deep learning using Keras/Tensorflow, and one of the options with them is the ability to save the model architecture as a .json file and loading the weights into that. Is there any plans on doing something like with with PyTorch? For a lot of use cases, it isn’t ideal to use the same development project to rebuild the model architecture to load the weights into in the deployment use-case.

Have you tried using Torchscript or exporting the model to onnx? They are self contained with weights and model structure.

I haven’t looked too much into Onnx, but that is on my radar. Not sure what Torchscript is, I should look into that.

You can take a look at https://github.com/pytorch/serve to deploy models otherwise you can use an intermediate export representation of choice like torchscript or ONNX