Reputation: 41
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?
Upvotes: 2
Views: 2471
Reputation:
Currently to my knowledge there is no API available to use InceptionV4
in Keras.
Instead, you can create the InceptionV4 network and load the pretrained weights in the created network in this link.
To create InceptionV4 and use it in your code, you can refer the link here.
Upvotes: 2