Swift for TensorFlow is a next generation system for deep learning and differentiable computing.
By integrating directly with a general purpose programming language, Swift for TensorFlow enables more powerful algorithms to be expressed like never before.
How it works
First-class autodiff
Differentiable programming gets first-class support in a general-purpose programming language. Take derivatives of functions, and make custom data structures differentiable in an instant.
Next-generation APIs
New APIs, informed by the best practices of today and the research directions of tomorrow, are easier to use and more powerful.
Builds on TensorFlow
APIs give you transparent access to all low-level TensorFlow operators.
High-quality tooling
Building upon Jupyter and LLDB, Swift in Colab improves your productivity with helpful tooling such as context-aware autocomplete.
Swift for TensorFlow tutorials
Tutorials for getting started

This tutorial walks you through how to build and train your first Swift for TensorFlow model.

Learn more about the Swift programming language and how it’s features apply to numerical programming and machine learning.

Learn how to harness the power of Swift for TensorFlow’s language-integrated automatic differentiation system, as well as how to fully customize it.

Using Swift for TensorFlow doesn’t mean you need to leave behind your favorite Python libraries. Learn about Swift for TensorFlow’s seamless Python interoperability capabilities in this tutorial.

Protocol-oriented programming and generics in day-to-day examples.


Jeremy Howard and Chris Lattner teach Swift for TensorFlow foundations in an advanced deep learning course.

Run Swift for TensorFlow on ARM64 processors at the edge with GPU acceleration by following these instructions.

Generate an image that exhibits stylistic features of an example image while preserving the high-level structure of the content.

Explore an ever-growing collection of models and examples built using Swift for TensorFlow.