Introducing Swift for Tensorflow

Yesterday we announced Swift for TensorFlow, which applies Swift to the domain of machine learning. The intro video is here:

The only additional details available are in a post to our community list, and I encourage you to sign up for the list if you’re interested in this project:!forum/swift

This project is still in early development: it builds on many things about Swift that are already great, and adds a few orthogonal things that combine in some pretty cool ways. To answer a FAQ, we do plan to contribute everything upstream to through the normal evolution processes when our code becomes mature enough.

Our short term plans are to catch up on sleep, write some white papers about how it all works, then release the white papers and code in April. At that point, we’re happy to go into extensive detail about anything that is interesting, but until then we’d prefer to avoid deep diving on it.



So no way to get more info without entering a google group (which is a total nogo from data protection point of view for me)?

I ask because the project sound very interesting but nothing will bring me into giving google my personal data. And I’m probably not the only one thinking about this.


Unless I’m mistaken you can read the group without an account. Also:

So just have a little patience I guess?

1 Like

Can you elaborate on what your concern is? A google group is just a mailing list. The only personal data you need to give is an email address.

Beyond that, it has a publicly available archive, so you only need to do that if you want to get emails from the list. The post in question is here:!topic/swift/xtXCEvtDe5Q



You don’t need a Google account to take part?

It may appear paranoid to most Americans but we germans are very sensitive to private data and tracking. And in this Google, like Facebook, can’t be trusted. I understand you work for them and I don’t say it’s evil behaviour - just not accepted around here. I think it’s a cultural thing like the amount of ads in media - I guess we would have riots if we would get as much ads as in the us ;P


Well you speak only for yourself and not for all Germans, thx. I know people that will say the same thing about Apple, but this isn‘t a thread about which giant company can be trusted or not.

Thank you for the new project Chris, the only thing I really miss is that Google would finally push Serverless (Google Cloud Functions, and especially Firebase Cloud Functions) a little and allow more languages including Swift, but I‘m looking forward to see what‘s TensorFlow and Swift is all about.



Is Keras going to be also supported in Swift?

High-level APIs in Swift like Keras are definitely in our roadmap, but the static nature of Swift makes the high-level APIs very different from existing python APIs, and some even require compiler support, e.g. aggregate parameter updates, “dtypes”, etc. The TensorFlow team would love to talk to the community and converge on the right high-level APIs.

In the meantime, anyone can still use Keras in Swift through the Python internop layer and dynamic member lookup/callable, but it won’t benefit from Swift for TensorFlow’s design (first-class tensor computation and automatic differentiation).


Congratulations on the announcement! I love the prospect of the Swift community growing to include people involved in a completely new domain - and that the boundaries of what can be expressed in the language are being pushed even further.
A great step towards Swift world domination. :slight_smile:


Well done to the entire team involved in this, and I’m really eager to see where this goes.

I’ve been curious about a few things around this, like how languages like Swift will get involved with machine learning, and why you’ve recently become really passionate about Python/Swift integration which suddenly makes sense! :wink:


Good news. And although I’m not TensorFlow user it will be interesting how this could influence on Swift. I’m glad to see new areas of Swift usage. Now when ML came to mobile devices it is very important direction. We see Apple efforts on this and now we get even more - possible Data Science-driven Swift evolution. Can not wait to see white papers.

1 Like

By the way, perhaps it is prematurely to discuss but in video at 9:24 we can see custom operator that not in the standart keyboard layout. It reminds me APL with its special keyboard for operators. It is funny and it seems like that after 60 years we could get such keyboard for Data Science. iPad already has special developer keyboard for Swift Playgrounds. May be it is time to specialize keyboards for Data Science/ML. With standart hardware keyboard it is problem though. It is interesting perspective for ML development usability in any case.


You need to add the word join at the end of the link:!forum/swift/join

1 Like

It seem the link was died :(

the non google email only seems to work on desktop mode.

I used google email, but cannot access.

This is a wonderful idea! I’ve signed up for the Google Group, and I believe that this will contribute to the continued expansion and improvement of Swift. Additionally, I think that it’s really great that Swift could become an important language for machine learning. I can’t wait to see where this leads!

1 Like

@Chris_Lattner3 was the project open sourced yet, I cannot find on GitHub?!

It is still April! I am literally writing docs right now to explain how it works, and have been at it all day. We’re not there yet, but it is coming soon.

Terms of Service

Privacy Policy

Cookie Policy