Talks: Catching Tensor Shape Errors without Running Your Code

Saturday - April 22nd, 2023 11:30 a.m.-noon in

Presented by:

Experience Level:

Some experience


Machine Learning (ML) is heavily used in industry and research, with millions of lines of critical algorithms written using libraries like Pytorch, TensorFlow, and Numpy. ML developers are often slowed down by errors because of long iteration times for ML models and difficulty in debugging ML code, which can lead to costly production crashes. Tensor shape mismatches are some of the most common errors for both new and experienced ML developers, occurring when an operation is fed a multi-dimensional array (tensor) with the wrong dimensions (shape).

We can represent the shape of a tensor using explicit type annotations, called shape types. With the help of a type checker, shape types let us catch Tensor shape mismatches without running the program. We can also see the symbolic shape of any tensor variable right in the IDE for faster development. In this talk, we will introduce shape types, describe how they can catch mismatch errors, and show how the audience can start using shape types in their machine learning projects to boost their productivity.