-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Initial commit to add AccelModels notebooks from AzureMlCli repo #343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
how-to-use-azureml/deployment/accelerated-models/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
|
|
||
| # Notebooks for Microsoft Azure Machine Learning Hardware Accelerated Models SDK | ||
|
|
||
| Easily create and train a model using various deep neural networks (DNNs) as a featurizer for deployment to Azure or a Data Box Edge device for ultra-low latency inferencing using FPGA's. These models are currently available: | ||
|
|
||
| * ResNet 50 | ||
| * ResNet 152 | ||
| * DenseNet-121 | ||
| * VGG-16 | ||
| * SSD-VGG | ||
|
|
||
| To learn more about the azureml-accel-model classes, see the section [Model Classes](#model-classes) below or the [Azure ML Python SDK documentation](https://docs.microsoft.com/en-us/python/api/overview/azure/ml/intro?view=azure-ml-py). | ||
|
|
||
| ### Step 1: Create an Azure ML workspace | ||
| Follow [these instructions](https://docs.microsoft.com/en-us/azure/machine-learning/service/quickstart-create-workspace-with-python) to install the Azure ML SDK on your local machine, create an Azure ML workspace, and set up your notebook environment, which is required for the next step. | ||
|
|
||
| ### Step 2: Install the Azure ML Accelerated Models SDK | ||
| Once you have set up your environment, install the Azure ML Accel Models SDK. This package requires tensorflow >= 1.6,<2.0 to be installed. | ||
|
|
||
| If you already have tensorflow >= 1.6,<2.0 installed in your development environment, you can install the SDK package using: | ||
|
|
||
| `` | ||
| pip install azureml-accel-models | ||
| `` | ||
|
|
||
| If you do not have tensorflow >= 1.6,<2.0 and are using a CPU-only development environment, our SDK with tensorflow can be installed using: | ||
|
|
||
| `` | ||
| pip install azureml-accel-models[cpu] | ||
| `` | ||
|
|
||
| If your machine supports GPU (for example, on an [Azure DSVM](https://docs.microsoft.com/en-us/azure/machine-learning/data-science-virtual-machine/overview)), then you can leverage the tensorflow-gpu functionality using: | ||
|
|
||
| `` | ||
| pip install azureml-accel-models[gpu] | ||
| `` | ||
|
|
||
| ### Step 3: Follow our notebooks | ||
|
|
||
| The notebooks in this repo walk through the following scenarios: | ||
| * [Quickstart](accelerated-models-quickstart.ipynb), deploy and inference a ResNet50 model trained on ImageNet | ||
| * [Object Detection](accelerated-models-object-detection.ipynb), deploy and inference an SSD-VGG model that can do object detection | ||
| * [Training models](accelerated-models-training.ipynb), train one of our accelerated models on the Kaggle Cats and Dogs dataset to see how to improve accuracy on custom datasets | ||
|
|
||
| <a name="model-classes"></a> | ||
| ## Model Classes | ||
| As stated above, we support 5 Accelerated Models. Here's more information on their input and output tensors. | ||
|
|
||
| **Available models and output tensors** | ||
|
|
||
| The available models and the corresponding default classifier output tensors are below. This is the value that you would use during inferencing if you used the default classifier. | ||
| * Resnet50, QuantizedResnet50 (output_tensors = "classifier_1/resnet_v1_50/predictions/Softmax:0") | ||
| * Resnet152, QuantizedResnet152 (output_tensors = "classifier/resnet_v1_152/predictions/Softmax:0") | ||
| * Densenet121, QuantizedDensenet121 (output_tensors = "classifier/densenet121/predictions/Softmax:0") | ||
| * Vgg16, QuantizedVgg16 (output_tensors = "classifier/vgg_16/fc8/squeezed:0") | ||
| * SsdVgg, QuantizedSsdVgg (output_tensors = ['ssd_300_vgg/block4_box/Reshape_1:0', 'ssd_300_vgg/block7_box/Reshape_1:0', 'ssd_300_vgg/block8_box/Reshape_1:0', 'ssd_300_vgg/block9_box/Reshape_1:0', 'ssd_300_vgg/block10_box/Reshape_1:0', 'ssd_300_vgg/block11_box/Reshape_1:0', 'ssd_300_vgg/block4_box/Reshape:0', 'ssd_300_vgg/block7_box/Reshape:0', 'ssd_300_vgg/block8_box/Reshape:0', 'ssd_300_vgg/block9_box/Reshape:0', 'ssd_300_vgg/block10_box/Reshape:0', 'ssd_300_vgg/block11_box/Reshape:0']) | ||
|
|
||
| For more information, please reference the azureml.accel.models package in the [Azure ML Python SDK documentation](https://docs.microsoft.com/en-us/python/api/overview/azure/ml/?view=azure-ml-py). | ||
|
|
||
| **Input tensors** | ||
|
|
||
| The input_tensors value defaults to "Placeholder:0" and is created in the [Image Preprocessing](#construct-model) step in the line: | ||
| `` | ||
| in_images = tf.placeholder(tf.string) | ||
| `` | ||
|
|
||
| You can change the input_tensors name by doing this: | ||
| `` | ||
| in_images = tf.placeholder(tf.string, name="images") | ||
| `` | ||
|
|
||
|
|
||
| ## Resources | ||
| * [Read more about FPGAs](https://docs.microsoft.com/en-us/azure/machine-learning/service/concept-accelerate-with-fpgas) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these are snippets user is supposed to enter as code please use
backticksThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is updated, can see at new commit https://github.com/Azure/MachineLearningNotebooks/pull/343/files#diff-e8750b7b6ee961ae966efa5c495a175d