我正在使用googlenet。有人可以告诉我如何使用keras在python中使用经过预训练的googlenet和alexnet。关于VGG和RESNET的材料太多,但我不了解如何使用经过预训练的googlenet和alexnet
对于Googlenet,您可以使用此模型。GoogLeNet in Keras。对于Alexnet Building AlexNet with Keras。问题是您无法找到该模型的图像网络权重,但可以从零开始训练该模型。keras上唯一经过预训练的模型是:
Xception,VGG16,VGG19,ResNet,ResNetV2,InceptionV3,InceptionResNetV2,MobileNet,MobileNetV2,密集网NASNet
希望我对您有帮助
对于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的砝码和代码。