models 包
使用 Azure ML 硬件加速模型服务加速的模型的 Python 表示形式。
模块
| accel_model |
包含 HW 加速模型的抽象基类的模块。 |
| doesnotexisterror |
不存在错误。 |
| utils |
模型的实用程序 - 大多与预处理相关。 |
类
| Densenet121 |
Densenet 的 Float-32 版本。 此模型采用 RGB 格式,且缩放系数为 0.017 |
| QuantizedDensenet121 |
Densenet 的量化版本。 此模型采用 RGB 格式。 |
| QuantizedResnet152 |
Renset-152 的量化版本。 |
| QuantizedResnet50 |
Renset-50 的量化版本。 |
| QuantizedSsdVgg |
SSD-VGG 的量化版本。 此模型采用 RGB 格式。 |
| QuantizedVgg16 |
VGG-16 的量化版本。 此模型采用 RGB 格式。 |
| Resnet152 |
Resnet-152 的 Float-32 版本。 |
| Resnet50 |
Resnet-50 的 Float-32 版本。 |
| SsdVgg |
SSD-VGG 的 Float-32 版本。 此模型采用 RGB 格式。 |
| Vgg16 |
VGG-16 的 Float-32 版本。 此模型采用 RGB 格式。 |
函数
preprocess_array
创建一个采用图像字节数组并返回正则化图像的 tensorflow 操作。
preprocess_array(in_images, order='RGB', scaling_factor=1.0, output_height=224, output_width=224, preserve_aspect_ratio=True)
参数
- in_images
必需
图像字节的 [?] 维张量。 (通常为占位符)
- order
默认值: RGB
通道顺序 -“BGR”或“RGB”
- scaling_factor
默认值: 1.0
通道值的乘数
- output_height
默认值: 224
输出图像高度
- output_width
默认值: 224
输出图像宽度
- preserve_aspect_ratio
默认值: True
如果为 True,则在缩放时保留图像纵横比
返回
图像的 float32 像素值的 [?, output_height, output_width, 3] 维张量。
反馈
提交和查看相关反馈