arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2011.13452cs.LGcs.SE
收藏

ShapeFlow:TensorFlow的动态形状解释器

ShapeFlow: Dynamic Shape Interpreter for TensorFlow

University of Washington(华盛顿大学);ETH Zurich(苏黎世联邦理工学院)

Sahil Verma, Zhendong Su

摘要:

我们介绍了TensorFlow的动态抽象解释器ShapeFlow,它可以快速捕获张量形状不兼容错误,这是深度学习代码中最常见的错误之一。ShapeFlow与TensorFlow共享相同的API,但仅捕获和发出张量形状,这是其抽象域。ShapeFlow构造一个自定义形状计算图,类似于TensorFlow使用的计算图。ShapeFlow不需要程序员进行代码注释或代码修改,因此使用方便。我们对先前实证研究收集的52个程序进行了评估,以显示与TensorFlow相比,它可以快速准确地捕获形状不兼容错误。我们使用两个基线:最坏情况下的训练数据集大小和更现实的数据集大小。ShapeFlow高度准确地检测形状不兼容错误-没有假阳性和单个假阴性-并且非常高效-第一和第二基线的平均速度分别为499倍和24倍。我们相信Shapeflow是一个实用的工具,可以使机器学习开发人员受益。我们将在GitHub上开源ShapeFlow,使其公开提供给开发人员和研究社区。

英文摘要:

We present ShapeFlow, a dynamic abstract interpreter for TensorFlow which quickly catches tensor shape incompatibility errors, one of the most common bugs in deep learning code. ShapeFlow shares the same APIs as TensorFlow but only captures and emits tensor shapes, its abstract domain. ShapeFlow constructs a custom shape computational graph, similar to the computational graph used by TensorFlow. ShapeFlow requires no code annotation or code modification by the programmer, and therefore is convenient to use. We evaluate ShapeFlow on 52 programs collected by prior empirical studies to show how fast and accurately it can catch shape incompatibility errors compared to TensorFlow. We use two baselines: a worst-case training dataset size and a more realistic dataset size. ShapeFlow detects shape incompatibility errors highly accurately -- with no false positives and a single false negative -- and highly efficiently -- with an average speed-up of 499X and 24X for the first and second baseline, respectively. We believe ShapeFlow is a practical tool that benefits machine learning developers. We will open-source ShapeFlow on GitHub to make it publicly available to both the developer and research communities.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑