Axon: A Language for Dynamic Shapes in Deep Learning Graphs

10/05/2022
by   Alexander Collins, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/19/2021

The CoRa Tensor Compiler: Compilation for Ragged Tensors with Minimal Padding

There is often variation in the shape and size of input data used for de...
research
02/26/2021

Tensors Fitting Perfectly

Multidimensional arrays (NDArrays) are a central abstraction in modern s...
research
03/16/2022

Gradual Tensor Shape Checking

Tensor shape mismatch is a common source of bugs in deep learning progra...
research
03/18/2016

Symbolic Tensor Calculus -- Functional and Dynamic Approach

In this paper, we briefly discuss the dynamic and functional approach to...
research
12/16/2021

A Static Analyzer for Detecting Tensor Shape Errors in Deep Neural Network Training Code

We present an automatic static analyzer PyTea that detects tensor-shape ...
research
04/24/2019

OperatorNet: Recovering 3D Shapes From Difference Operators

This paper proposes a learning-based framework for reconstructing 3D sha...
research
10/28/2020

papaya2: 2D Irreducible Minkowski Tensor computation

A common challenge in scientific and technical domains is the quantitati...

Please sign up or login with your details

Forgot password? Click here to reset