You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-9Lines changed: 31 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,31 +16,53 @@ This image will allow you to easily take the official [Swift for TensorFlow](htt
16
16
```bash
17
17
docker run --rm --security-opt seccomp:unconfined -itv ${PWD}:/usr/src \
18
18
zachgray/swift-tensorflow:4.2 \
19
-
swift -I/usr/lib/swift/clang/include
19
+
swift
20
20
```
21
21
22
22
#### Observe the output:
23
23
24
24
```
25
-
Welcome to Swift version 4.2-dev (LLVM 04bdb56f3d, Clang b44dbbdf44). Type :help for assistance.
26
-
1>
25
+
Welcome to Swift version 4.2-dev (LLVM fd66ce58db, Clang cca52e8396, Swift 280486afdc).
26
+
Type :help for assistance.
27
+
1>
27
28
```
28
29
29
30
#### Interact with TensorFlow:
30
31
31
32
```
32
33
1> import TensorFlow
33
-
2> var x = Tensor([[1, 2], [3, 4]])
34
-
2018年04月27日 04:30:17.505272: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
Assuming you've added a swift file ([like this one shown in the official docs](https://github.com/tensorflow/swift/blob/master/Usage.md#interpreter)) in your current directory with the name `inference.swift`:
43
+
Assuming you've added a swift file, like this one copied from [official docs](https://github.com/tensorflow/swift/blob/master/Usage.md#interpreter) in your current directory with the name `inference.swift`:
44
+
45
+
```swift
46
+
importTensorFlow
47
+
48
+
structMLPClassifier {
49
+
var w1 = Tensor<Float>(shape: [2, 4], repeating: 0.1)
0 commit comments