Skip to content

dogehk/swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift for TensorFlow

Welcome to the Swift for TensorFlow development community!

Swift for TensorFlow is a new way to develop machine learning models. It gives you the power of TensorFlow directly integrated into the Swift programming language. With Swift, you can write the following imperative code the 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.

import TensorFlow

var x = Tensor([[1, 2, 3]])

for i in 1...100 {
  if x > 50 { break }
  x += tanh(x)
}

print(x)

Swift combines the flexibility of Eager execution with the high performance of Graphs. Behind the scenes, Swift analyzes your Tensor code and automatically builds graphs for you. Swift also catches type errors and shape error before running your code. 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.

Installation and Usage

You can download a pre-built package for Swift for TensorFlow here. After installing Swift for TensorFlow, you can learn how to use the project here.

For instructions on building from source, visit google/swift.

Documentation

Below are some documents explaining the Swift for TensorFlow project.

Conceptual overview:

Technical deeper dives:

Swift API reference:

Source code

Currently, the active development of Swift for TensorFlow will happen under the "tensorflow" branch of google/swift.

These projects include:

As the code matures, we aim to move it upstream to the corresponding Swift.org repositories.

Models

You can find example models in tensorflow/swift-models.

Community

Discussion about Swift for TensorFlow happens on the [email protected] mailing list.

Bugs Reports and Feature Requests

Please stay tuned on how to file bugs and feature requests. For now, please send comments to the mailing list.

Contributing

We welcome source code contributions: please read the Contributor Guide to get started. It is always a good idea to discuss your plans on the mailing list before making any major submissions.

Code of Conduct

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

The Swift for TensorFlow community is guided by our Code of Conduct, which we encourage everybody to read before participating.

About

Swift for TensorFlow Project Home Page

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%