|
19 | 19 | B = TensorValue(5.0, 6.0, 7.0, 8.0) |
20 | 20 | u = VectorValue(1.0, 2.0) |
21 | 21 | v = VectorValue(3.0, 4.0) |
22 | | - @test u ⊗ v == TensorValue(3.0, 6.0, 4.0, 8.0) |
23 | | - @test u ⊗₁² v == TensorValue(3.0, 6.0, 4.0, 8.0) |
| 22 | + @test u ⊗ v == TensorValue(3.0, 6.0, 4.0, 8.0) |
| 23 | + @test u ⊗₁² v == TensorValue(3.0, 6.0, 4.0, 8.0) |
24 | 24 | @test A ⊗ B == TensorValue(5.0, 10.0, 15.0, 20.0, 6.0, 12.0, 18.0, 24.0, 7.0, 14.0, 21.0, 28.0, 8.0, 16.0, 24.0, 32.0) |
25 | 25 | @test A ⊗₁₂³⁴ B == TensorValue(5.0, 10.0, 15.0, 20.0, 6.0, 12.0, 18.0, 24.0, 7.0, 14.0, 21.0, 28.0, 8.0, 16.0, 24.0, 32.0) |
26 | 26 | @test A ⊗₁₃²⁴ B == TensorValue(5.0, 10.0, 6.0, 12.0, 15.0, 20.0, 18.0, 24.0, 7.0, 14.0, 8.0, 16.0, 21.0, 28.0, 24.0, 32.0) |
27 | 27 | @test A ⊗₁₄²³ B == TensorValue(5.0, 10.0, 6.0, 12.0, 7.0, 14.0, 8.0, 16.0, 15.0, 20.0, 18.0, 24.0, 21.0, 28.0, 24.0, 32.0) |
28 | | - @test u ⊗₁²³ A == TensorValue{2,4}(1.0, 2.0, 2.0, 4.0, 3.0, 6.0, 4.0, 8.0) |
29 | | - @test A ⊗₁₂³ u == TensorValue{2,4}(1.0, 2.0, 3.0, 4.0, 2.0, 4.0, 6.0, 8.0) |
30 | | - @test A ⊗₁₃² u == TensorValue{2,4}(1.0, 2.0, 2.0, 4.0, 3.0, 4.0, 6.0, 8.0) |
| 28 | + @test u ⊗₁²³ A == TensorValue{2,4}(1.0, 2.0, 2.0, 4.0, 3.0, 6.0, 4.0, 8.0) |
| 29 | + @test A ⊗₁₂³ u == TensorValue{2,4}(1.0, 2.0, 3.0, 4.0, 2.0, 4.0, 6.0, 8.0) |
| 30 | + @test A ⊗₁₃² u == TensorValue{2,4}(1.0, 2.0, 2.0, 4.0, 3.0, 4.0, 6.0, 8.0) |
31 | 31 | end |
32 | 32 |
|
33 | 33 |
|
|
79 | 79 | @test inner(H,A) == TensorValue(90.0, 100.0, 110.0, 120.0) |
80 | 80 | @test inner(G,A) == VectorValue(50.0, 60.0) |
81 | 81 | @test inner(G,V) == TensorValue(35.0, 46.0, 57.0, 68.0) |
| 82 | + @test H ⊙ A == TensorValue(90.0, 100.0, 110.0, 120.0) |
| 83 | + @test G ⊙ A == VectorValue(50.0, 60.0) |
| 84 | + @test G ⊙ V == TensorValue(35.0, 46.0, 57.0, 68.0) |
82 | 85 | end |
83 | 86 |
|
84 | 87 |
|
|
0 commit comments