如何在keras中使用预训练的googlenet和alexnet

问题描述 投票:1回答:2

我正在使用googlenet。有人可以告诉我如何使用keras在python中使用经过预训练的googlenet和alexnet。关于VGG和RESNET的材料太多,但我不了解如何使用经过预训练的googlenet和alexnet

python
2个回答
0
投票

对于Googlenet,您可以使用此模型。GoogLeNet in Keras。对于Alexnet Building AlexNet with Keras。问题是您无法找到该模型的图像网络权重,但可以从零开始训练该模型。keras上唯一经过预训练的模型是:

Xception,VGG16,VGG19,ResNet,ResNetV2,InceptionV3,InceptionResNetV2,MobileNet,MobileNetV2,密集网NASNet

希望我对您有帮助


0
投票

对于GoogleNet,建议to follow these instructions。本质上,在下面的链接中,分析性地描述了如何在项目中实现不同的预训练模型。您可以使用configuration.json文件修改选项。

# load the user configs
with open('conf/conf.json') as f:    
   config = json.load(f)

和.json文件:

{
 "model"           : "inceptionv3",
 "weights"         : "imagenet",
 "include_top"     : false,

 ...
 ...

}

关于AlexNet,您可以找到要使用in here的砝码和代码。

© www.soinside.com 2019 - 2024. All rights reserved.