Suhwan
Suhwan

Reputation: 23

Is just combination layers ensemble model?

I made a machine learning code in keras that is combination of cnn and lstm(merge)

Is just combination layers ensemble model?

from keras.layers import Dense, LSTM, Conv2D, Flatten, concatenate

lstmLayer = LSTM(10)(input)
cnnLayer = Conv2D(10, (3,3)(input)
flatLayer = Flatten()(cnnLayer)
cnnDense = Dense(10)(flatLayer)

concat = concatenate([lstmLayer, cnnDense])

output = Dense(1)(concat)

Upvotes: 0

Views: 169

Answers (1)

Dr. Snoopy
Dr. Snoopy

Reputation: 56357

No, combining layers is not an ensemble, you can have different layers in one model. Only a combination of fully trained models is an ensemble.

Upvotes: 2

Related Questions