@@ -33,7 +33,7 @@ public func postdom_crash1(w1: Tensor<Float>, inputBatch: Tensor<Float>) {
33
33
// expected-warning @-2 {{'inputBatch' implicitly copied to the accelerator}}
34
34
let iterationCount = 1000
35
35
for _ in 0 ..< iterationCount {
36
- _ = inputBatch ⊗ w1 // expected-note 2 {{value used here}}
36
+ _ = inputBatch • w1 // expected-note 2 {{value used here}}
37
37
}
38
38
}
39
39
@@ -91,10 +91,10 @@ public func testStraightLineXORTraining() {
91
91
92
92
// Training loop
93
93
for _ in 0 ..< iterationCount {
94
- let mmul1 = inputBatch ⊗ w1
94
+ let mmul1 = inputBatch • w1
95
95
let l1 = mmul1 + b1
96
96
let o1 = sigmoid ( l1)
97
- let mmul2 = o1 ⊗ w2
97
+ let mmul2 = o1 • w2
98
98
let l2 = mmul2 + b2
99
99
let pred = sigmoid ( l2)
100
100
@@ -109,15 +109,15 @@ public func testStraightLineXORTraining() {
109
109
let dL2 = dPred * pred * ( 1 - pred)
110
110
let dMmul2 = dL2
111
111
let dB2 = dL2
112
- let dO1 = dMmul2 ⊗ w2. transposed ( withPermutations: 1 , 0 )
113
- let dW2 = o1. transposed ( withPermutations: 1 , 0 ) ⊗ dMmul2
112
+ let dO1 = dMmul2 • w2. transposed ( withPermutations: 1 , 0 )
113
+ let dW2 = o1. transposed ( withPermutations: 1 , 0 ) • dMmul2
114
114
let dL1 = dO1 * l1 * ( 1 - l1)
115
115
let dMmul1 = dL1
116
116
let dB1 = dL1
117
117
118
118
// Statically detected shape mismatch!
119
119
// expected-error @+1 {{(op: 'MatMul') with input shapes: [4,2], [4,4]}}
120
- let dW1 = inputBatch ⊗ dMmul1
120
+ let dW1 = inputBatch • dMmul1
121
121
122
122
// Descent
123
123
w1 -= ( dW1 * learningRate)
0 commit comments