Skip to content

Commit

Permalink
More README updates
Browse files Browse the repository at this point in the history
  • Loading branch information
EmergentOrder committed Nov 17, 2020
1 parent 006d886 commit 4f60f19
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,14 @@ val imageTensDefaultDenotations = Tensor(data,shape)
Note that ONNX Tensor content is in row-major order.

```scala
val out = squeezenet.fullModel[Float, "ImageNetClassification","Batch" ##: "Class" ##: TSNil,1 #: 1000 #: SNil](Tuple(imageTens))
val out = squeezenet.fullModel[Float,
"ImageNetClassification",
"Batch" ##: "Class" ##: TSNil,
1 #: 1000 #: SNil](Tuple(imageTens))
// val out:
// org.emergentorder.onnx.Tensors.Tensor[Float, ("ImageNetClassification", "Batch" ##: "Class" ##:
// org.emergentorder.onnx.Tensors.Tensor[Float,
// ("ImageNetClassification",
// "Batch" ##: "Class" ##:
// org.emergentorder.compiletime.TSNil
// , 1 #: 1000 #: io.kjaer.compiletime.SNil)] = (Array(0.8230729,
// ...
Expand Down Expand Up @@ -96,7 +101,9 @@ val onnxBackend = new ORTOperatorBackendAll()

val longTens = Tensor(Array.fill(1*3*224*224){-42l},tensorDenotation,tensorShapeDenotation,shape)
// longTens:
// org.emergentorder.onnx.Tensors.Tensor[Float, ("Image", "Batch" ##: "Channel" ##: "Height" ##: "Width" ##:
// org.emergentorder.onnx.Tensors.Tensor[Float,
// ("Image",
// "Batch" ##: "Channel" ##: "Height" ##: "Width" ##:
// org.emergentorder.compiletime.TSNil
// , 1 #: 1000 #: io.kjaer.compiletime.SNil)] = (
// Array(
Expand All @@ -106,7 +113,9 @@ val longTens = Tensor(Array.fill(1*3*224*224){-42l},tensorDenotation,tensorShape

onnxBackend.AbsV6("abs", longTens)
// res2:
// org.emergentorder.onnx.Tensors.Tensor[Float, ("Image", "Batch" ##: "Channel" ##: "Height" ##: "Width" ##:
// org.emergentorder.onnx.Tensors.Tensor[Float,
// ("Image",
// "Batch" ##: "Channel" ##: "Height" ##: "Width" ##:
// org.emergentorder.compiletime.TSNil
// , 1 #: 1000 #: io.kjaer.compiletime.SNil)] = (
// Array(
Expand Down
17 changes: 13 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,14 @@ val imageTensDefaultDenotations = Tensor(data,shape)
Note that ONNX Tensor content is in row-major order.

```scala
val out = squeezenet.fullModel[Float, "ImageNetClassification","Batch" ##: "Class" ##: TSNil,1 #: 1000 #: SNil](Tuple(imageTens))
val out = squeezenet.fullModel[Float,
"ImageNetClassification",
"Batch" ##: "Class" ##: TSNil,
1 #: 1000 #: SNil](Tuple(imageTens))
// val out:
// org.emergentorder.onnx.Tensors.Tensor[Float, ("ImageNetClassification", "Batch" ##: "Class" ##:
// org.emergentorder.onnx.Tensors.Tensor[Float,
// ("ImageNetClassification",
// "Batch" ##: "Class" ##:
// org.emergentorder.compiletime.TSNil
// , 1 #: 1000 #: io.kjaer.compiletime.SNil)] = (Array(0.8230729,
// ...
Expand Down Expand Up @@ -96,7 +101,9 @@ val onnxBackend = new ORTOperatorBackendAll()

val longTens = Tensor(Array.fill(1*3*224*224){-42l},tensorDenotation,tensorShapeDenotation,shape)
// longTens:
// org.emergentorder.onnx.Tensors.Tensor[Float, ("Image", "Batch" ##: "Channel" ##: "Height" ##: "Width" ##:
// org.emergentorder.onnx.Tensors.Tensor[Float,
// ("Image",
// "Batch" ##: "Channel" ##: "Height" ##: "Width" ##:
// org.emergentorder.compiletime.TSNil
// , 1 #: 1000 #: io.kjaer.compiletime.SNil)] = (
// Array(
Expand All @@ -106,7 +113,9 @@ val longTens = Tensor(Array.fill(1*3*224*224){-42l},tensorDenotation,tensorShape

onnxBackend.AbsV6("abs", longTens)
// res2:
// org.emergentorder.onnx.Tensors.Tensor[Float, ("Image", "Batch" ##: "Channel" ##: "Height" ##: "Width" ##:
// org.emergentorder.onnx.Tensors.Tensor[Float,
// ("Image",
// "Batch" ##: "Channel" ##: "Height" ##: "Width" ##:
// org.emergentorder.compiletime.TSNil
// , 1 #: 1000 #: io.kjaer.compiletime.SNil)] = (
// Array(
Expand Down

0 comments on commit 4f60f19

Please sign in to comment.