3
私は画像分類器の微調整に関するthis keras blogを模倣しようとしています。私はon a fchollet repoを発見Inceptionv3を使用したいと思います。Keras機能モデルに結合
開始はModel
(機能的API)なので、model.add(top_model)
はSequential
のために予約されています。
2つの機能を組み合わせて追加するにはどうすればいいですか?Model
?のは、私は2番目の最初のモデルと
inputs_2 = Input(shape=(4,))
y = Dense(5)(l_inputs)
y = Dense(2, name='final2')(y)
predictions_2 = Dense(29)(y)
model2 = Model(input=inputs2, output=predictions2)
ため
inputs = Input(shape=input_shape)
x = Flatten()(inputs)
predictions = Dense(4, name='final1')(x)
model1 = Model(input=inputs, output=predictions)
を持っているとしましょう。私は現在、inputs
からpredicions_2
へ、そしてpredictions
からinputs_2
にリンクするエンドツーエンドを望んでいます。
私はmodel1.get_layer('final1').output
を使用してみましたが、タイプとの不一致があり、動作させることができませんでした。あなたため
(a)のpredictions_1とpredictions_2問題: