Installing a production line version of Pytorch

Dear to whom it may concern,

I have tried to install Pytorch on my instance but found that it is too big of a file (at ~700MB). Is there a minimal version of Pytorch (smaller size) that I could install for the main purpose of functioning in the production line (requires a few functions)?

Below are the only imports that were used:

import torch
import torch.nn as nn
from torch.distributions import MultivariateNormal
from torch.distributions import Categorical

If there is, may I have a recommended approach to install the CPU and/or the GPU supported versions of Pytorch (with terminal lines)?

Thank you so much!

No, unfortunately there are no pre-built binaries with a subset of PyTorch (at least no official ones) and I’m also unaware of building a subset from source.

I don’t know which methods you are exactly using but import torch would import all modules (some modules might need an explicit import but are in the same namespace).

Oh dear. Could this be a feature that can be requested from Pytorch?

Sure, you can create this feature request on GitHub and depending on the interest, someone might want to work on it. However, note that I don’t see which subset should be built if you depend on import torch directly.

1 Like