@@ -44,7 +44,7 @@ val squeezenetBytes = Files.readAllBytes(Paths.get("squeezenet1.1.onnx"))
4444val squeezenet = new ORTModelBackend (squeezenetBytes)
4545
4646val data = Array .fill(1 * 3 * 224 * 224 ){42f }
47- val tensorDenotation : String & Singleton = " SomeTensorType "
47+ val tensorDenotation : String & Singleton = " Image "
4848// In NCHW tensor image format
4949val tensorShapeDenotation = " Batch" ##: " Channel" ##: " Height" ##: " Width" ##: TSNil
5050val shape = 1 #: 3 #: 224 #: 224 #: SNil
@@ -58,12 +58,13 @@ val imageTensDefaultDenotations = Tensor(data,shape)
5858Note that ONNX Tensor content is in row-major order.
5959
6060``` scala
61- val out = squeezenet.fullModel[Float , " T " ," T " ##: TSNil ,1 #: 1000 #: SNil ](Tuple (imageTens))
61+ val out = squeezenet.fullModel[Float , " ImageNetClassification " ," Batch " ##: " Class " ##: TSNil ,1 #: 1000 #: SNil ](Tuple (imageTens))
6262// val out:
63- // org.emergentorder.onnx.Tensors.Tensor[Float, ("T ", "T " ##:
63+ // org.emergentorder.onnx.Tensors.Tensor[Float, ("ImageNetClassification ", "Batch" ##: "Class " ##:
6464// org.emergentorder.compiletime.TSNil
6565// , 1 #: 1000 #: io.kjaer.compiletime.SNil)] = (Array(0.8230729,
6666// ...
67+
6768// The output shape
6869out.shape
6970// val res0: Array[Int] = Array(1, 1000)
@@ -95,7 +96,7 @@ val onnxBackend = new ORTOperatorBackendAll()
9596
9697val longTens = Tensor (Array .fill(1 * 3 * 224 * 224 ){- 42l },tensorDenotation,tensorShapeDenotation,shape)
9798// longTens:
98- // org.emergentorder.onnx.Tensors.Tensor[Float, ("T ", "T " ##:
99+ // org.emergentorder.onnx.Tensors.Tensor[Float, ("Image ", "Batch" ##: "Channel" ##: "Height" ##: "Width " ##:
99100// org.emergentorder.compiletime.TSNil
100101// , 1 #: 1000 #: io.kjaer.compiletime.SNil)] = (
101102// Array(
@@ -105,7 +106,7 @@ val longTens = Tensor(Array.fill(1*3*224*224){-42l},tensorDenotation,tensorShape
105106
106107onnxBackend.AbsV6 (" abs" , longTens)
107108// res2:
108- // org.emergentorder.onnx.Tensors.Tensor[Float, ("T ", "T " ##:
109+ // org.emergentorder.onnx.Tensors.Tensor[Float, ("Image ", "Batch" ##: "Channel" ##: "Height" ##: "Width " ##:
109110// org.emergentorder.compiletime.TSNil
110111// , 1 #: 1000 #: io.kjaer.compiletime.SNil)] = (
111112// Array(
0 commit comments