@@ -174,9 +174,9 @@ third-party libraries like [TensorFlow](https://github.com/tensorflow/swift).
174
174
import TensorFlow
175
175
176
176
let model = Sequential {
177
- var layer1 = Dense< Float > (inputSize : 784 , outputSize : 100 , activation : relu)
178
- var layer2 = Dense< Float > (inputSize : 100 , outputSize : 30 , activation : relu)
179
- var layer3 = Dense< Float > (inputSize : 30 , outputSize : 3 , activation : identity)
177
+ Dense< Float > (inputSize : 784 , outputSize : 100 , activation : relu)
178
+ Dense< Float > (inputSize : 100 , outputSize : 30 , activation : relu)
179
+ Dense< Float > (inputSize : 30 , outputSize : 3 , activation : identity)
180
180
}
181
181
182
182
var classifier = Model ()
@@ -238,12 +238,13 @@ Differentiation is the process of computing derivatives. See the
238
238
[ "Math Introduction"] ( #math-introduction ) section below for more details.
239
239
240
240
Derivatives are a fundamental tool in calculus and have applications in many
241
- domains, notably deep learning. Numerical computing in Swift is an expressive,
242
- high-performance language that is a great fit for numerical applications. Recent
243
- proposals have paved the way for low-level numerical computing in Swift:
244
- [ AdditiveArithmetic] [ SE-0233 ] , SIMD [[ 1] [ SE-0229 ]] [[ 2] [ SE-0251 ]] , [ generic math
245
- functions] [ SE-0246 ] . However, high-level numerical computing applications,
246
- including machine learning and artificial intelligence, require more work.
241
+ domains, notably deep learning. As an expressive, high-performance language,
242
+ Swift is a great fit for numerical applications. The [ Swift Numerics
243
+ library] [ swift-numerics ] and recent Swift Evolution proposals have paved the way
244
+ for low-level numerical computing in Swift: [ AdditiveArithmetic] [ SE-0233 ] , SIMD
245
+ [[ 1] [ SE-0229 ]] [[ 2] [ SE-0251 ]] , [ generic math functions] [ SE-0246 ] . However,
246
+ high-level numerical computing applications, including machine learning and
247
+ artificial intelligence, require more work.
247
248
248
249
We believe that first-class differentiable programming is a big step towards
249
250
high-level numerical computing support and will make Swift a real contender in
@@ -362,7 +363,7 @@ like Python: these languages are concise and easy to use. However, some people
362
363
prefer safer programming: features like type checking and static diagnostics
363
364
help catch errors early and improve productivity.
364
365
365
- Differentiable programming in Swift enables safe, powerful machine learning.
366
+ Differentiable programming in Swift enables safe, expressive machine learning.
366
367
Custom differentiable data structures can be declared and checked at
367
368
compile-time. Thanks to protocol-oriented programming, differentiable types are
368
369
generalized by a protocol, enabling differential operators to be defined as
@@ -2640,6 +2641,8 @@ Parker Schuh, and Dimitrios Vytiniotis.
2640
2641
[Dan Zheng]: https: // github.com/dan-zheng
2641
2642
[Marc Rasi]: https: // github.com/marcrasi
2642
2643
[Bart Chrzaszcz]: https: // github.com/bartchr808
2644
+
2645
+ [swift- numerics]: https: // github.com/apple/swift-numerics
2643
2646
[SE- 0229 ]: https: // github.com/apple/swift-evolution/blob/master/proposals/0229-simd.md
2644
2647
[SE- 0233 ]: https: // github.com/apple/swift-evolution/blob/master/proposals/0233-additive-arithmetic-protocol.md
2645
2648
[SE- 0246 ]: https: // github.com/apple/swift-evolution/blob/master/proposals/0246-mathable.md
0 commit comments