You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [add] moved command arguments build to the respective class
* [add] dagrun and dagrun_ro supported ( scriptrun included )
* [add] added ResNet-50 example to the Readme
Copy file name to clipboardExpand all lines: README.md
+69-2Lines changed: 69 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,73 @@ Example of AI.SCRIPTSET and AI.SCRIPTRUN
125
125
})();
126
126
```
127
127
128
+
Example of AI.DAGRUN enqueuing multiple SCRIPTRUN and MODELRUN commands
129
+
130
+
A common pattern is enqueuing multiple SCRIPTRUN and MODELRUN commands within a DAG. The following example uses ResNet-50,to classify images into 1000 object categories.
131
+
132
+
Given that our input tensor contains each color represented as a 8-bit integer and that neural networks usually work with floating-point tensors as their input we need to cast a tensor to floating-point and normalize the values of the pixels - for that we will use `pre_process_4ch` function.
133
+
134
+
To optimize the classification process we can use a post process script to return only the category position with the maximum classification - for that we will use `post_process` script.
135
+
136
+
Using the DAG capabilities we've removed the necessity of storing the intermediate tensors in the keyspace. You can even run the entire process without storing the output tensor, as follows:
0 commit comments