Last updated 12th August, 2020.
- A python environment with Torch (
Save a simple model
Let\'s take a simple example of a
Torch model to illustrate:
import torch # Initialize model model = torch.nn.Sequential( torch.nn.Linear(2, 2), torch.nn.Linear(2, 2), ) # Train model ... # Save model with open('my_model.pt', 'wb') as file: torch.save(model, file)
Your model is now serialized on your local file system in the
- You can check the OVHcloud documentation on how to deploy custom models.
- You can check the supported compatibilities for Tensorflow SavedModel