Axon:一种用于深度学习图的动态建模语言
Axon: A Language for Dynamic Shapes in Deep Learning Graphs
摘要:
Axon是一种语言,可以对深度学习图中的张量进行形状和秩推断。它的目的是使形状隐式和推断,以类似的方式如何类型是隐式和推断在许多函数式程序设计语言。张量维数由符号变量、常量和算术运算符组成的表达式表示。张量形状可以表示为这些维度表达式的序列,作为符号变量,或作为其他形状的附加。这允许表达形状上的复杂约束。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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。