![keras 应用](https://i-blog.csdnimg.cn/blog_migrate/f657f79843a2d94e88a79f05d4f76773.png)
keras 应用
Keras-应用 (Keras - Applications)
Keras applications module is used to provide pre-trained model for deep neural networks. Keras models are used for prediction, feature extraction and fine tuning. This chapter explains about Keras applications in detail.
Keras应用程序模块用于为深度神经网络提供预训练的模型。 Keras模型用于预测,特征提取和微调。 本章详细介绍了Keras应用程序。
预训练模型 (Pre-trained models)
Trained model consists of two parts model Architecture and model Weights. Model weights are large file so we have to download and extract the feature from ImageNet database. Some of the popular pre-trained models are listed below,
训练后的模型由架构和权重两部分组成。 模型权重是大文件,因此我们必须从ImageNet数据库下载并提取特征。 下面列出了一些流行的预训练模型,
- ResNet ResNet
- VGG16 VGG16
- MobileNet 移动网
- InceptionResNetV2 盗版ResNetV2
- InceptionV3 盗梦空间V3
载入模型 (Loading a model)
Keras pre-trained models can be easily loaded as specified below −
Keras预训练模型可以轻松加载,如下所示:
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 Inception_V3 model
inception_model = inception_v3.InceptionV3(weights = 'imagenet')
#Load the ResNet50 model
resnet_model = resnet50.ResNet50(weights = 'imagenet')
#Load the MobileNet model mobilenet_model = mobilenet.MobileNet(weights = 'imagenet')
Once the model is loaded, we can immediately use it for prediction purpose. Let us check each pre-trained model in the upcoming chapters.
加载模型后,我们可以立即将其用于预测目的。 让我们在接下来的章节中检查每个预先训练的模型。
翻译自: https://www.tutorialspoint.com/keras/keras_applications.htm
keras 应用