inception模型

inception 模型的使用,这里主要实现了其中一个inception模块的实现

'''
from keras.layers import Conv2D, MaxPooling2D, Concatenate
from keras.models import Input,Model

input_img = Input(shape=(256, 256,3))

tower_1 = Conv2D(64, (1, 1), padding='same', activation='relu')(input_img)
tower_1 = Conv2D(64, (3, 3), padding='same', activation='relu')(tower_1)

tower_2 = Conv2D(64, (1, 1), padding='same', activation='relu')(input_img)
tower_2 = Conv2D(64, (5, 5), padding='same', activation='relu')(tower_2)

tower_3 = MaxPooling2D((3, 3), strides=(1, 1), padding='same')(input_img)
tower_3 = Conv2D(64, (1, 1), padding='same', activation='relu')(tower_3)

output = Concatenate(axis=-1)([tower_1, tower_2, tower_3])

model = Model(inputs=input_img,outputs=output)

print(model.summary())
'''

你可能感兴趣的:(inception模型)