-
## PyTorch
## 深度残差网络
主讲人:龙良曲
## ResNet
## • The residual module
- Introduce skip or shortcut connections (existing before in various forms in literature)
• Make it easy for network layers to represent Shaoqing Ren, and Jian Sun, Deep Residual Learning for Image Recognition, CVPR 2016 (Best Paper)
## ResNet
Deeper residual module (bottleneck)
- Directly performing 3x3 convolutions with 256 feature maps p4_2.jpg)
## UNTIL A DEEPER MODEL
## ResNet: ILSVRC 2015 winner
## Revolution of Depth
|AlexNet, 8 layers (ILSVRC 2012)|VGG, 19 layers (ILSVRC 2014)|ResNet, 152 layers (ILSVRC 2015)|
|---|---|---|
0 码力 |
12 页 |
977.96 KB
| 2 年前 3
-
商品识别篇:使用 ResNet 识别你的货架商品
## ☐ ☐ ☐ ☐
扫码试看/订阅
《 TensorFlow 2 项目进阶实战》视频课程
## 目录
- 基础:图像分类问题定义与说明
- 基础:越来越深的图像分类网络
- 应用:检测SKU抠图与分类标注流程
- 应用:分类训练集与验证集划分
- 应用:使用TensorFlow 2训练ResNet
- 应用:使用ResNet识别货架商品 ImageNet. Left: a building block (on 56×56 feature maps) as in Fig. 3 for ResNet-34. Right: a “bottleneck” building block for ResNet-50/101/152.
|model|top-1 err.|top-5 err.|
|---|---|---|
|VGG-16 \[41]|28 \[13]|24.27|7.38|
|plain-34|28.54|10.02|
|ResNet-34 A|25.03|7.76|
|ResNet-34 B|24.52|7.46|
|ResNet-34 C|24.19|7.40|
|ResNet-50|22.85|6.71|
|ResNet-101|21.75|6.05|
|ResNet-152|21.43|5.71|
Table 3. Error rates
0 码力 |
58 页 |
23.92 MB
| 2 年前 3
-
jpg)

## 下一课时
## ResNet
## Thank You
0 码力 |
13 页 |
1.20 MB
| 2 年前 3
-
the Aggregated Residual Transformations for Deep Neural Networks paper.
It is based on the regular ResNet model, which substitutes 3x3 convolutions in the bottleneck block for 3x3 grouped convolutions. This the paper is in the backbone. Specifically, the VGG model is obsolete and has been replaced by the ResNet50 model.
This model script is available on GitHub and NGC.
Neural Collaborative Filtering (NCF) Filtering paper.
This model script is available on GitHub and NGC.
ResNet50 v1.5 model: This model is a modified version of the original ResNet50 v1 model.
This model script is available on GitHub and NGC
0 码力 |
365 页 |
2.94 MB
| 2 年前 3
-
Keras — Applications .....88
Loading a model .....88
16. Keras — Real Time Prediction using ResNet Model .....89
17. Keras — Pre-Trained Models .....92
VGG16 .....92
MobileNetV2 .....92 extract the feature from ImageNet database. Some of the popular pre-trained models are listed below,
• ResNet
• VGG16
• MobileNet
• InceptionResNetV2
• InceptionV3
## Loading a model
Keras pre-trained specified below:
import keras
import numpy as np
from keras.applications import vgg16, inception_v3, resnet50, mobilenet
# Load the VGG model
vgg_model = vgg16.VGG16(weights='imagenet')
# Load the
0 码力 |
98 页 |
1.57 MB
| 2 年前 3
-
来源: Learning Semantic Image Representations at a Large Scale, Yangqing Jia
## Convolution
## •
ResNet-50
## • PyTorch Profiler
This report only display top-level ACL
• torch.set_float32_fast_math_mode("BF16")
1 # 假设 resnet.py 包含用户写的模型推理的代码
2 DNNL_DEFAULT_FPMATH_MODE=BF16 python3 resnet.py
import torch
# ...
# 在模型执行前设置fast math mode
torch.set_flo • 阿里云 ECS g8y vs g7 (Ice Lake)
• 8vCPUs
• TensorFlow 推理测试
• ResNet-50
• batch size 32
## • PyTorch 推理测试
• Mask R-CNN
每张图像耗时
ResNet-50 推理时间
、VGG16(16层)、GoogLeNet(22层)、ResNet50(50层)、DenseNet121(121层)等模型相继被提出,同时输入图片的大小也从 $ 28 \times 28 $ 逐渐增大,变成 $ 224 \times 224 $ 、 $ 416 0 码力 |
439 页 |
29.91 MB
| 2 年前 3 -
203e99d6cb066cd89cc35531775c47e/p13_2.jpg)
## Cloud TPU v3 Pod Performance: Two Examples
Train ResNet-50 ImageNet image classification model from scratch in <2 minutes on full v3 Pod
Process more module: Utilities for ImageNet data preprocessing & prediction dec.
inception_resnet_v2 module: Inception-ResNet V2 model for Keras.
inception_v3 module: Inception V3 model for Keras.
mobilenet module: NASNet-A models for Keras.
resnet module: ResNet models for Keras.
resnet50 module: Public API for tf.keras.applications.resnet50 namespace.
resnet_v2 module: ResNet v2 models for Keras.
vgg16 module: 0 码力 |
38 页 |
4.85 MB
| 2 年前 3 -
detection results. YOLOv2 performs on par with state-of-the-art detectors like Faster R-CNN with ResNet and SSD512 and is $ 2 - 10 \times $ faster.
|||0.5:0.95|0.5|0.75|S|M|L|1|10|100|S|M|L|
|--- RetinaNet 网络结构

(a) ResNet

(b) feature pyramid network architecture uses a Feature Pyramid Network (FPN) $ [20] $ backbone on top of a feedforward ResNet architecture $ [16] $ (a) to generate a rich, multi-scale convolutional feature pyramid (b). To 0 码力 |
67 页 |
21.59 MB
| 2 年前 3 -
classifier 网络结构
加载分类模型 ResNet
| import tensorflow as tf | | classifier = tf.keras.models.load_model("models/ResNet50/ResNet50_classified.h5 h5") | | classifier.summary() | | Model: "ResNet50_classified" | | Layer (type) | Output Shape | Param # | Connected 保存类别名称文件
with open("models/ResNet50/ResNet50_classified_class.txt", "w+") as f:
f.write(str(class_name))
## 加载类别名称文件
with open("models/ResNet50/ResNet50_classified_class.txt" 0 码力 |
54 页 |
6.30 MB
| 2 年前 3
|
|