diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-11-28 13:02:02 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-11-28 13:02:02 +0100 |
commit | 7cbf6c75962e44f76c64c2442b45c83fe275fdcb (patch) | |
tree | 608e5d93e62e55c24bddca35f874d5100466e214 /vespajlib/src/test/java/com/yahoo/tensor/functions | |
parent | e12e2d54042b2aeca632ee630f0d67695dfb2f1b (diff) |
Always output tensor type in toString
This allows us to always restore a tensor accurately from
its toString form.
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/tensor/functions')
-rw-r--r-- | vespajlib/src/test/java/com/yahoo/tensor/functions/TensorFunctionTestCase.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/tensor/functions/TensorFunctionTestCase.java b/vespajlib/src/test/java/com/yahoo/tensor/functions/TensorFunctionTestCase.java index 55069eaced7..e37bee2d990 100644 --- a/vespajlib/src/test/java/com/yahoo/tensor/functions/TensorFunctionTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/tensor/functions/TensorFunctionTestCase.java @@ -14,11 +14,11 @@ public class TensorFunctionTestCase { @Test public void testTranslation() { - assertTranslated("join({{x:1}:1.0}, reduce({{x:1}:1.0}, sum, x), f(a,b)(a / b))", + assertTranslated("join(tensor(x{}):{{x:1}:1.0}, reduce(tensor(x{}):{{x:1}:1.0}, sum, x), f(a,b)(a / b))", new L1Normalize(new ConstantTensor("{{x:1}:1.0}"), "x")); assertTranslated("tensor(x[2],y[3],z[4])((x==y)*(y==z))", new Diag(new TensorType.Builder().indexed("y",3).indexed("x",2).indexed("z",4).build())); - assertTranslated("join({{x:1}:1.0,{x:3}:5.0,{x:9}:3.0}, reduce({{x:1}:1.0,{x:3}:5.0,{x:9}:3.0}, max, x), f(a,b)(a==b))", + assertTranslated("join(tensor(x{}):{{x:1}:1.0,{x:3}:5.0,{x:9}:3.0}, reduce(tensor(x{}):{{x:1}:1.0,{x:3}:5.0,{x:9}:3.0}, max, x), f(a,b)(a==b))", new Argmax(new ConstantTensor("{ {x:1}:1, {x:3}:5, {x:9}:3 }"), "x")); } |