3 ms·
Here's some context: https://github.com/tensorflow/swift/blob/master/docs/WhySwiftForTensorFlow.md https://github.com/tensorflow/swift/blob/master/docs/WhySwif
by favorited 9y ago
Here's some context: https://github.com/tensorflow/swift/blob/master/docs/WhySwiftForTensorFlow.md https://github.com/tensorflow/swift/blob/master/docs/WhySwif...
Some benefits vs Python are static types (catching more errors at compile-time vs hours into a training run), no GIL, don't have to drop to C++ for higher performance.
Some benefits vs some other (non-Python) languages are a shallow learning curve, small boilerplate, safety-by-default, and a growing community.
Obviously there are places where Python and others have advantages over Swift too, and several of those are called out in the paper.
- dnautics 9y agoIs it really likely that you'll catch a type exception hours into a training run? The way tf works it'll catch a shape exception before you even start training.
- netheril96 9y agoI don't have experience of a type exception hours into run, but for me, deploying code to the test environment is long, so the edit-run cycle is very long. If the compiler can catch the errors locally, then edit-(compile)-run is shortened.
- candiodari 9y agoThis sort-of feedbacks on itself. I use estimators, so type errors occur far into a run, but not during training itself, and checkpoints mean very rapid recovery, so ... I think I actually stopped caring so much because the recovery is so fast. Big help for me was coding a little script that means I can just send a notification to my android from from cli and/or python, so I know when these things need attention.
- Eridrus 9y agoIts not likely, but I've had it happen to me where 2200 batches in it crashes because the graph has dynamic sizes and the input is not well formed. Static typing would not have helped. But, static typing could help provide much more useful error messages than what you get from the Python code.