我做的转移学习使用keras。这是我做了什么:
伪代码:
mnet=MobileNet(include_top=False,pooling='max',
weights='imagenet',input_shape=(224,224,3))
my_net = bottle_neck = Input(shape=(1024,))
some_layer = Dense(100 ,activation='relu')(bottle_neck)
...
final_layer=Dense(6,activation='softmax')(prev_layers)
我的目标是连接mobilnet,我不净火车一遍感谢ü
这是覆盖Keras文档中,看到https://keras.io/applications/#fine-tune-inceptionv3-on-a-new-set-of-classes
关键的东西是使用作为模型(mnet.output
)的输入端的基本模型输出,并且设置基本模型作为trainable = False
触及层