From: Richard Wei Date: Sun, 29 Apr 2018 06:51:28 +0000 (-0700) Subject: Update the Swift for TensorFlow community page. X-Git-Tag: upstream/v1.9.0_rc1~190^2^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e1f3efcb34380df1441660d9759b44bb07cf1cd;p=platform%2Fupstream%2Ftensorflow.git Update the Swift for TensorFlow community page. PiperOrigin-RevId: 194687897 --- diff --git a/tensorflow/docs_src/community/swift.md b/tensorflow/docs_src/community/swift.md index f065b20..a7da189 100644 --- a/tensorflow/docs_src/community/swift.md +++ b/tensorflow/docs_src/community/swift.md @@ -1,18 +1,44 @@ -# Swift Community +

+ +

+ +# Swift for TensorFlow Welcome to the Swift for TensorFlow development community! -Swift for TensorFlow is the result of first-principles thinking applied to -machine learning frameworks and aims to take TensorFlow usability to new -heights. Swift for TensorFlow is based on the belief that machine learning is -important enough for first-class language and compiler support, and thus works -very differently from normal language bindings. - -First-class language and compiler support allow us to innovate in areas that -traditionally were out of bounds for machine learning libraries. Our -programming model combines the performance of TensorFlow graphs with the -flexibility and expressivity of Eager execution, while keeping a strong focus -on improved usability at every level of the stack. +Swift for TensorFlow is a new way to develop machine learning models. It +gives you the power of +[TensorFlow](https://www.tensorflow.org/programmers_guide/eager) directly +integrated into the [Swift programming language](https://swift.org/about). +With Swift, you can write the following imperative code, and Swift +automatically turns it into **a single TensorFlow Graph** and runs it +with the full performance of TensorFlow Sessions on CPU, GPU and +[TPU](https://cloud.google.com/tpu/docs/tpus). + +```swift +import TensorFlow + +var x = Tensor([[1, 2], [3, 4]]) + +for i in 1...5 { + x += x ⊗ x +} + +print(x) +``` + +Swift combines the flexibility of +[Eager Execution](https://www.tensorflow.org/programmers_guide/eager) with the +high performance of [Graphs and Sessions](https://www.tensorflow.org/programmers_guide/graphs). +Behind the scenes, Swift analyzes your Tensor code and automatically builds +graphs for you. Swift also catches type errors and shape mismatches before +running your code, and has [Automatic Differentiation](https://en.wikipedia.org/wiki/Automatic_differentiation) +built right in. We believe that machine learning tools are so important that +they deserve **a first-class language and a compiler**. + +**Note:** Swift for TensorFlow is an early stage research project. It has been +released to enable open source development and is not yet ready for general use +by machine learning developers. ## Open Source