summaryrefslogtreecommitdiffstats
path: root/model-integration
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@verizonmedia.com>2019-05-07 16:35:25 +0200
committerJon Bratseth <bratseth@verizonmedia.com>2019-05-07 16:35:25 +0200
commitf6967b70f6213961033d7be9e53a59b37d9b7b85 (patch)
tree05a30390231f111f41c6a08985040741df37a888 /model-integration
parent84738dbd4aa45ecd54f2f3d04af3b31490fdf766 (diff)
Expect float tensors from Onnx
Diffstat (limited to 'model-integration')
-rw-r--r--model-integration/src/test/java/ai/vespa/rankingexpression/importer/onnx/OnnxMnistSoftmaxImportTestCase.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/model-integration/src/test/java/ai/vespa/rankingexpression/importer/onnx/OnnxMnistSoftmaxImportTestCase.java b/model-integration/src/test/java/ai/vespa/rankingexpression/importer/onnx/OnnxMnistSoftmaxImportTestCase.java
index 07814687dc6..35c853bd746 100644
--- a/model-integration/src/test/java/ai/vespa/rankingexpression/importer/onnx/OnnxMnistSoftmaxImportTestCase.java
+++ b/model-integration/src/test/java/ai/vespa/rankingexpression/importer/onnx/OnnxMnistSoftmaxImportTestCase.java
@@ -31,13 +31,13 @@ public class OnnxMnistSoftmaxImportTestCase {
Tensor constant0 = Tensor.from(model.largeConstants().get("test_Variable"));
assertNotNull(constant0);
- assertEquals(new TensorType.Builder().indexed("d2", 784).indexed("d1", 10).build(),
+ assertEquals(new TensorType.Builder(TensorType.Value.FLOAT).indexed("d2", 784).indexed("d1", 10).build(),
constant0.type());
assertEquals(7840, constant0.size());
Tensor constant1 = Tensor.from(model.largeConstants().get("test_Variable_1"));
assertNotNull(constant1);
- assertEquals(new TensorType.Builder().indexed("d1", 10).build(), constant1.type());
+ assertEquals(new TensorType.Builder(TensorType.Value.FLOAT).indexed("d1", 10).build(), constant1.type());
assertEquals(10, constant1.size());
// Check inputs
@@ -52,7 +52,7 @@ public class OnnxMnistSoftmaxImportTestCase {
output.expression());
assertEquals(TensorType.fromSpec("tensor<float>(d0[],d1[784])"),
model.inputs().get(model.defaultSignature().inputs().get("Placeholder")));
- assertEquals("{Placeholder=tensor(d0[],d1[784])}", output.argumentTypes().toString());
+ assertEquals("{Placeholder=tensor<float>(d0[],d1[784])}", output.argumentTypes().toString());
}
@Test