Abstract Tensor shape mismatch is a common source of bugs in deep learning programs. We propose new type-based approach to detect tensor mismatches. One the main features our best-effort inference. As inference problem undecidable general, we allow static type/shape be performed only manner. If cannot guarantee absence inconsistencies, dynamic checks are inserted into program. Another feature g...