models Package
Python representation of models accelerated with the Azure ML Hardware Accelerated Models Service.
Modules
accel_model |
Module with abstract base class of HW accelerated models. |
doesnotexisterror |
Does not exist error. |
utils |
Utilities for models - mostly preprocessing related. |
Classes
Densenet121 |
Float-32 Version of Densenet. This model is in RGB format, and has a scaling factor of 0.017 Create a Float-32 version of Densenet. This model is in RGB format. |
QuantizedDensenet121 |
Quantized version of Densenet. This model is in RGB format. Create a version of Densenet quantized for the Azure ML Hardware Accelerated Models Service. This model is in RGB format. |
QuantizedResnet152 |
Quantized version of Renset-152. Create a version of resnet 50 quantized for the Azure ML Hardware Accelerated Models Service. |
QuantizedResnet50 |
Quantized version of Renset-50. Create a version of resnet 50 quantized for the Azure ML Hardware Accelerated Models Service. |
QuantizedSsdVgg |
Quantized version of SSD-VGG. This model is in RGB format. Create a version of SSD VGG quantized for the Azure ML Hardware Accelerated Models Service. This model is in RGB format. :param model_base_path: Path to download the model into. Used as a cache locally. :param is_frozen: Should the weights of the model be frozen when it is imported. Freezing the weights can lead to faster training time, but may cause your model to perform worse overall. Defaults to false. |
QuantizedVgg16 |
Quantized version of VGG-16. This model is in RGB format. Create a version of VGG 16 quantized for the Azure ML Hardware Accelerated Models Service. This model is in RGB format. |
Resnet152 |
Float-32 Version of Resnet-152. Create a Float-32 version of resnet 152. |
Resnet50 |
Float-32 Version of Resnet-50. Create a Float-32 version of resnet 50. |
SsdVgg |
Float-32 Version of SSD-VGG. This model is in RGB format. Create a Float-32 version of SSD-VGG. |
Vgg16 |
Float-32 Version of VGG-16. This model is in RGB format. Create a Float-32 version of VGG 16. |
Functions
preprocess_array
Create a tensorflow op that takes an array of image bytes and returns regularized images.
preprocess_array(in_images, order='RGB', scaling_factor=1.0, output_height=224, output_width=224, preserve_aspect_ratio=True)
Parameters
Name | Description |
---|---|
in_images
Required
|
[?] dim tensor of image bytes. (Typically a placeholder) |
order
|
order of channels - either 'BGR' or 'RGB' default value: RGB
|
scaling_factor
|
multiplier for channel values default value: 1.0
|
output_height
|
output image height default value: 224
|
output_width
|
output image width default value: 224
|
preserve_aspect_ratio
|
if True, preserve image aspect ratio while scaling default value: True
|
Returns
Type | Description |
---|---|
[?, output_height, output_width, 3] dim tensor of float32 pixel values of the image. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for