[英]How to import InceptionV4 model which is pre-trained to train our model in Kaggle?
inputs = Input(shape=(img_dims, img_dims, 3))
from keras.applications.inception_v3 import InceptionV3
base_model = InceptionV3(weights='imagenet',include_top=False,input_shape=(img_dims, img_dims, 3))
x = base_model.output
x = Dropout(0.5)(x)
from keras.layers import GlobalAveragePooling2D
x = GlobalAveragePooling2D()(x)
x = Dense(128,activation='relu')(x)
x = BatchNormalization()(x)
output = Dense(1,activation = 'sigmoid')(x)
How to replace inception v3 with inception v4 and call the required weights?如何用 inception v4 替换 inception v3 并调用所需的权重?
Currently to my knowledge there is no API available to use InceptionV4
in Keras.据我所知,目前没有可用于在 Keras 中使用
InceptionV4
API。
Instead, you can create the InceptionV4 network and load the pretrained weights in the created network in this link .相反,您可以在此链接中创建 InceptionV4 网络并在创建的网络中加载预训练权重。
To create InceptionV4 and use it in your code, you can refer the link here.要创建 InceptionV4 并在您的代码中使用它,您可以参考此处的链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.