3 ms·
Have you looked at ONNX? It is a neural network exchange format that, in particular, lets you deploy PyTorch models in production via Caffe2. Here is a tutorial
by Marat_Dukhan 9y ago
Have you looked at ONNX? It is a neural network exchange format that, in particular, lets you deploy PyTorch models in production via Caffe2. Here is a tutorial: http://pytorch.org/docs/master/onnx.html http://pytorch.org/docs/master/onnx.html
Disclaimer: I work on Caffe2 team (not on ONNX, though)
- ffriend 9y agoIf I want to export my own computational graph to ONNX, what is the first place I should look at? Do you know about any documentation or reference implementation of the format?
- Marat_Dukhan 9y agoReference specification and validator are hosted in https://github.com/onnx/onnx https://github.com/onnx/onnx
- agibsonccc 9y agoWe are taking a pretty hard look at ONNX right now. It doesn't support a lot of ops yet. I would add that it's very early for supporting anything "real" yet.
- syllogism 9y agoDoes the ONNX thing actually work? I'm super skeptical of these interchanges, because it seems very difficult to avoid train/test skew. Any difference in detail between the two implementations is a potential problem. I can imagine different order of operations putting out some values by 0.1%, causing 1% eventual loss of accuracy.
- Marat_Dukhan 9y agoIt should, if you find that converted model doesn't work, it is a bug, please file it with PyTorch and/or Caffe2. Implementation details of course differ between frameworks, but luckily neural networks are very robust to noise. In my experience, changes like using Winograd/Fourier for convolutions, or even running the whole thing in FP16 do not result in noticeable artifacts, and these are among the biggest differences you could have between frameworks.