PyTorch, TensorFlow, and tigers (Oh my!)
Looking to start a working group for interoperability. Expected deliverables:
- New libraries and PRs to major repositories for cross-ML-framework interoperability
- Learning modules, including FAQs around moving from one framework to another
- Best-practice guides and example repos for sharing models & research (i.e., os.path.join, setuptools, &etc.)
- TensorFlow & TensorFlow ecosystem build guides for more platforms and Linux distributions than is officially supported
To elaborate on the first two bullet points:
Of the many popular machine-learning frameworks out there,
PyTorch and
TensorFlow are leading the fray. It would be great to enumerate the differences for beginners moving from one (or the other) framework.
Once
that's done, it would be pertinent to build tools and libraries to
combine experiments—models &etc.—from multiple machine-learning
frameworks.
There is already work here, e.g.,
- Keras (TensorFlow, CNTK, Theano);
- MMdnn (Caffe, Keras, MXNet, Tensorflow, CNTK, PyTorch Onnx and CoreML);
- ONNX (many)
…but I think there is something majorly missing, even when you just look at sharing between PyTorch and TensorFlow.
Proposed solutions to literally sharing code—without conversion—between TensorFlow and PyTorch:
- Build a new Keras backend for PyTorch
- Build a new ontology abstraction that people should use instead of Keras for PyTorch and TensorFlow
- Work at the IR level, ensuring, e.g., that both frameworks use MLIR
- Fill in the PyTorch API using TensorFlow imports
- Fill in the TensorFlow API using PyTorch imports
The last two here I am most leaning towards… as these can be monkeypatched in for seamless interoperability across codebases*
*expecting some caveats to apply
Along the way various helpers will need to be ported out of TensorFlow, e.g.,
tf.data (and not with trivial
.as_numpy() solutions).
PS: Don't think that PyTorch is the only framework in scope… but we should start somewhere =)
PPS: Cross-posted this to ML GDE group
If
you're interested reply to this email thread. I'll send through a
calendar invite for the inaugural meeting once sufficient interested has
been shown.
Let's stop competing and start collaborating
