论文标题

轴突:深度学习图中动态形状的语言

Axon: A Language for Dynamic Shapes in Deep Learning Graphs

论文作者

Collins, Alexander, Grover, Vinod

论文摘要

轴突是一种在深度学习图中启用张量的形状和排名推断的语言。它旨在以与许多功能编程语言中隐含和推断的类型相似的方式使形状具有隐式和推断。张量尺寸由由符号变量,常数和算术运算符组成的表达式表示。张量形状可以表示为这些尺寸表达式的序列,作为符号变量,也可以表示为其他形状的附加。这允许表达形状上的复杂约束。 Axon具有样式功能,具有类似于标准ML的类型系统,扩展到包含形状信息。它提供了一套内置的操作员,包括张紧器,包括刻有算术运算符,地图,还原,循环和用户定义的功能。我们根据解决形状的信息,从程序员提供的形状信息和程序的结构中描述了一种形状推理算法,该算法求解了形状的信息。这允许对复杂深度学习图的张量的形状进行全自动推断。在指定图表时,这种方法会减少程序员的努力,因为张量的形状不是明确的,因此可以在保持输入和输出张量张量兼容性的同时组成深度学习图,并通过在运行时识别形状不匹配来识别形状不匹配,从而有助于自动误差检测。

Axon is a language that enables shape and rank inference for tensors in a Deep Learning graphs. It aims to make shapes implicit and inferred, in a similar manner to how types are implicit and inferred in many functional programming languages. Tensor dimensions are represented by expressions consisting of symbolic variables, constants, and arithmetic operators. Tensor shapes can be expressed as either a sequence of these dimension expressions, as a symbolic variable, or as an appending of other shapes. This allows complex constraints on shapes to be expressed. Axon is functional in style, with a type system similar in to Standard ML, extended to include shape information. It provides a suite of built in operators over tensors, including pointwise arithmetic operators, maps, reduction, loops and user defined functions. We describe a shape inference algorithm based on constraint solving which infers information about shapes, from both shape information provided by the programmer and the structure of the program. This allows fully automatic inference of the shapes of tensors for complex Deep Learning graphs. This approach reduces programmer effort when specifying graphs, as tensor shapes are not explicit, allows composition of Deep Learning graphs while maintaining input and output tensor shape compatibility, and aids in automated error detection by identifying shape mismatches at runtime.

扫码加入交流群

加入微信交流群

微信交流群二维码

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