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.

See tutorials

Tutorials show you how to use Swift

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

For beginners
Building your first model

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

For beginners
A Swift Tour

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

For researchers
Custom AutoDiff

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

For researchers
Python Interoperability

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.

For those who want to go deeper
Protocol-oriented programming

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

For researchers
Transfer Learning

Repurpose a model for training on a new task.

News & announcements

Check out our blog for additional updates, and subscribe to our monthly TensorFlow newsletter to get the latest announcements sent directly to your inbox.

June 28, 2019  
Fast.AI Course Available

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

August 16, 2019  
Nvidia Jetson GPU build

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

May 2, 2019  
Neural Style Transfer with S4TF

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

December 9, 2019  
S4TF Model Garden

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