Skip to content

Commit 062fa0d

Browse files
authored
Merge pull request #438 from microsoft/user/numform/batching-readme
Add Batching README
2 parents 7cdb559 + 0dcaa43 commit 062fa0d

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# WinML Samples Gallery: Batching
2+
Perform infererence over multiple inputs at once to increase runtime performance.
3+
4+
Use this sample to compare inference runtime performace with and without batched inputs. 50 images will be passed through SqueezeNet for classification. Set a batch size and click Start Inference to compare.
5+
6+
<img src="docs/BatchingScreenshot.png" width="650"/>
7+
8+
- [Getting Started](#getting-started)
9+
- [BatchSizeOverride](#batchsizeoverride)
10+
- [Feedback](#feedback)
11+
- [External Links](#external-links)
12+
13+
## Getting Started
14+
- Check out the [source](https://github.com/microsoft/Windows-Machine-Learning/blob/master/Samples/WinMLSamplesGallery/WinMLSamplesGallery/Samples/Batching/Batching.xaml.cs).
15+
- Learn how to [add the BatchSizeOverride property](https://github.com/microsoft/Windows-Machine-Learning/blob/master/Samples/WinMLSamplesGallery/WinMLSamplesGallery/Samples/Batching/Batching.xaml.cs#L125) to your session.
16+
- Learn how to [evaluate batched input](https://github.com/microsoft/Windows-Machine-Learning/blob/master/Samples/WinMLSamplesGallery/WinMLSamplesGallery/Samples/Batching/Batching.xaml.cs#L186).
17+
18+
## BatchSizeOverride
19+
- Learn more about the BatchSizeOverride property from the [docs](https://docs.microsoft.com/en-us/uwp/api/windows.ai.machinelearning.learningmodelsessionoptions.batchsizeoverride?view=winrt-22000).
20+
- **Note**: To use batched inputs, the model must have a value of -1 or a variable name in the input batch dimension. Additionally, the DATA_BATCH Denotation must be added on the batch dimension. To edit your model you can use tools like [WinML Dashboard](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Tools/WinMLDashboard).
21+
22+
## Feedback
23+
Please file an issue [here](https://github.com/microsoft/Windows-Machine-Learning/issues/new) if you encounter any issues with the WinML Samples Gallery or wish to request a new sample.
24+
25+
## External Links
26+
27+
- [Windows ML Library (WinML)](https://docs.microsoft.com/en-us/windows/ai/windows-ml/)
28+
- [DirectML](https://github.com/microsoft/directml)
29+
- [ONNX Model Zoo](https://github.com/onnx/models)
30+
- [Windows UI Library (WinUI)](https://docs.microsoft.com/en-us/windows/apps/winui/)
65.6 KB
Loading

0 commit comments

Comments
 (0)