We publicly demonstrated Swift for TensorFlow at the TensorFlow Developer Summit in March, and we are pleased to announce that Swift for TensorFlow is now open source on GitHub:

https://github.com/tensorflow/swift

Swift for TensorFlow provides a new programming model for TensorFlow that combines the flexibility and expressiveness of The TensorFlow computation diagram with Eager Execution while focusing on improving the availability of each layer of the entire software architecture. In order to achieve our goal, after much deliberation, we decided to improve the Swift programming language and compiler directly, and make Tensor a first-class citizen of Swift, so that we can improve the user experience.

Our approach is different from the general TensorFlow approach and opens up many new opportunities and channels to solve existing problems. Although the project is still in the early stages of development, we decided to make it open source, Posting our designs on an open discussion group for all enthusiasts to participate in.

Design document

We wrote some documentation detailing our theory and implementation. These documents can be found in the README file:

https://github.com/tensorflow/swift/blob/master/README.md

The first required document is “Swift for TensorFlow Design Overview,” which describes the main components of the project and how they are combined.

In addition, we will detail several important areas of the project. The foundation of our design is an algorithm we call Graph Program Extraction, which allows you to easily implement code using an Eager Execution programming model while retaining the high performance benefits of TensorFlow computational graphs. In addition, we have integrated advanced auto-differentiation capabilities directly into the Swift language and compiler. We also delved into Python’s integration with Swift, allowing you to use any Python API directly from Swift code.

The realization of reliable Graph Program Extraction algorithm has high requirements for programming language design. After analysis and discussion, we chose Swift as the main language. To learn more about how we decided to use Swift as the programming language for TensorFlow, you can find the answer here:

https://github.com/tensorflow/swift/blob/master/docs/WhySwiftForTensorFlow.md

Take action!

Since the project is still in its early stages, there are many ways you can get involved and contribute to the project! We have installation packages for macOS and Linux, as well as development guides that teach you how to get the source code. At this stage, if you encounter difficulties, you can contact us in the “TensorFlow Suggestions and Feedback” section of the TensorFlow Chinese Community Forum:

https://www.tensorflowers.cn/b/issues

We’re excited to create a new programming experience for TensorFlow, and we’d love to hear from you!

 Click on the below |  readingread The originalwen  | To learn more


Be a Tensorflower