论文标题
ShapeFlow:张量流的动态形状解释器
ShapeFlow: Dynamic Shape Interpreter for TensorFlow
论文作者
论文摘要
我们提出ShapeFlow,这是一种用于张量流的动态抽象解释器,可快速捕获张量形状不兼容错误,这是深度学习代码中最常见的错误之一。 ShapeFlow具有与张量流相同的API,但仅捕获并发出张量形状,即其抽象域。 ShapeFlow构造一个自定义形状计算图,类似于Tensorflow使用的计算图。 ShapeFlow不需要编程器的代码注释或代码修改,因此很方便使用。我们评估了先前经验研究收集的52个程序的ShapeFlow,以显示与张曲流相比,它可以捕获形状不兼容误差的速度和准确性。我们使用两个基准:最差的培训数据集大小和更现实的数据集大小。 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.