TensorFlow™ Patterns

A list of patterns for software development in TensorFlow.

View the patterns Contribute

TensorFlow Patterns is a collection of patterns in the spirit of Christopher Alexanders Timeless Way of Building. The project seeks to catalog developer experience and distill patterns that can improve our use of TensorFlow.

Start by checking out the patterns. If you see some that you like, try them and experience them directly. If you have some experience to share, it's easy to contribute back!

TensorFlow Patterns is an open community project that encourages contributions from any and all. If you'd like to contribute please check out the project's super straight forward contribution policy.


Alexander's method for identifying and describing patterns centers on human emotions rather than design philosophies or edicts. In that spirit, we outline a simple method for the patterns:

  • A pattern should be used and something you can observe
  • A pattern should be repeated over enough time to inform your experience
  • A pattern must feel good when used
  • In some cases a pattern may be based on abstract thought without experience

Every pattern must be defined with the following:

  • Name
  • Scope (see our working list of scopes)
  • One line summary of the pattern
  • Detailed description of the pattern including why the pattern is good and where it should be used

Patterns may also include:

  • Illustrations to clarify the pattern
  • Sample source code
  • References to supporting matterial
  • Links to related or alternative/competing patterns

When creating patterns, start with the Pattern Template and make changes as needed.

Popular patterns