论文标题

TF-Coder:张量操作的程序合成

TF-Coder: Program Synthesis for Tensor Manipulations

论文作者

Shi, Kensen, Bieber, David, Singh, Rishabh

论文摘要

深度学习的成功和普及正在上升,部分原因是强大的深度学习框架(例如Tensorflow和Pytorch)使开发深度学习模型变得更加容易。但是,这些库也具有陡峭的学习曲线,因为这些框架中的编程与具有明确的循环和有条件的传统命令编程完全不同。在这项工作中,我们提出了一种称为TF-Coder的工具,用于以Tensorflow中的示例编程。 TF-Coder使用自下而上的加权枚举搜索,基于价值的相同表达式和灵活的类型和基于价值的过滤,以确保表达符合Tensorflow库施加的各种要求。我们训练模型,以预测从输入和输出张量的功能以及任务的自然语言描述的张量操作,以确定搜索过程中相关操作的优先级。 TF-Coder在5分钟内解决了70个现实世界中的63个,有时与经验丰富的人类程序员相比,有时在更少的时间内找到更简单的解决方案。

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 train models to predict TensorFlow operations from features of the input and output tensors and natural language descriptions of tasks, to prioritize relevant operations during search. TF-Coder solves 63 of 70 real-world tasks within 5 minutes, sometimes finding simpler solutions in less time compared to experienced human programmers.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源