Goto

Collaborating Authors

 tf-coder


Introducing TF-Coder, a tool that writes tricky TensorFlow expressions for you!

#artificialintelligence

TF-Coder is a program synthesis tool that helps you write TensorFlow code. Instead of coding a tricky tensor manipulation directly, you can just demonstrate it through an illustrative example, and TF-Coder provides the corresponding code automatically.


TF-Coder: Program Synthesis for Tensor Manipulations

Shi, Kensen, Bieber, David, Singh, Rishabh

arXiv.org Machine Learning

The success and popularity of deep learning is on the rise, partially due to powerful deep learning frameworks such as TensorFlow and PyTorch that make it easier to develop deep learning models. However, these libraries also come with steep learning curves, since programming in these frameworks is quite different from traditional imperative programming with explicit loops and conditionals. In this work, we present a tool called TF-Coder for programming by example in TensorFlow. TF-Coder uses a bottom-up weighted enumerative search, with value-based pruning of equivalent expressions and flexible type- and value-based filtering to ensure that expressions adhere to various requirements imposed by the TensorFlow library. We also train models that predict TensorFlow operations from features of the input and output tensors and natural language descriptions of tasks, and use the models to prioritize relevant operations during the search. TF-Coder solves 63 of 70 real-world tasks within 5 minutes, often finding solutions that are simpler than those written by TensorFlow experts.