2
假設我有10萬的數據集400 X我建立這個模型:Keras,如何得到預測與模型去掉最後一層
model = Sequential()
model.add(Dense(200, input_dim = 400, init = init_weights))
model.add(BatchNormalization())
model.add(SReLU())
model.add(Dropout(0.5))
model.add(Dense(200, init = init_weights))
model.add(BatchNormalization())
model.add(SReLU())
model.add(Dropout(0.5))
model.add(Dense(1, activation = 'linear', init = init_weights))
比我打電話
model.compile(loss = ..
而且
model.fit(input_matrix,..
訓練結束後,我可以調用model.predict(..用於預測。
我想獲得從去年沒有線性分層模型預測矩陣..
因此,像:
model.remove_last_layer
pred_matrix = model.predict(input_matrix)
其產量100K×200陣列,我怎麼能做到這一點與keras? THX很多
你有你的模型中訓練的? –
是的,我得到了訓練 – gugatr0n1c
什麼是你的'後端',你能打印'model.summary()'? –