Warning: PyTorch integration is still under development and does not yet have as much support as Caffe2 model loading.
Import PyTorch models to Glow via the PyTorch JIT IR.
See glow/torch_glow/examples
for illustrative examples.
- Follow directions in Building.md to make sure Glow can be built
- install PyTorch nightly
- install torchvision:
pip install torchvision
- cd to
glow/torch_glow
python setup.py test
- use the
--cmake_prefix_path
flag to specify an llvm install location just like when building glow - to disable capturing test outputs, add
addopts = -s
to[tool:pytest]
in setup.cfg
- use the
python setup.py develop
- verify with installation worked with
import torch_glow
in Python
- verify with installation worked with
python setup.py install
- verify with installation worked with
import torch_glow
in Python
- verify with installation worked with