I build a keras functionnal model and when I plot the summary, the first conv1d layer don't appear...
from tensorflow.keras.layers import Input, Dense, LSTM, Dropout, TimeDistributed, Conv1D,
MaxPooling1D, Flatten
from tensorflow.keras import Model, regularizers, initializers
tensor_input = Input(shape=(Xn.shape[1], Xn.shape[2]), name='main_inputs')
xy = TimeDistributed(Conv1D(filters= 10, kernel_size= 3,
activation=params['activationCNN1']))
xy = TimeDistributed(MaxPooling1D(pool_size= 2))
xy = TimeDistributed(Conv1D(filters=5, kernel_size= 2,
activation=params['activationCNN1']), name='Cnn1d-2')
xy = TimeDistributed(MaxPooling1D(pool_size= 2), name='MaxPool')
xy = TimeDistributed(Flatten(), name='Flatten')
xy = LSTM(params['unitsLstm1'],activation=params['activationLSTM1'],
return_sequences=False, stateful=params['stateful'],
name='Hlayer1')(tensor_input)
xy = Dropout(rate = params['dropout1'])(xy)
xy = Dense(params['unitsDense1'], activation=params['activationDense1'],
kernel_initializer= initializers.he_uniform(), name='Dense1')(xy)
xy = Dropout(rate = params['dropout2'])(xy)
out = Dense(autres_param['timestepsOut'], activation=params['activationDenseOutput'],
kernel_initializer= initializers.he_uniform(), name='DenseOutput')(xy)
model = Model(inputs=tensor_input, outputs=out)
model.compile(optimizer=optimizer, loss=params['loss'])
# summarize layers
print(model.summary())
What I get is: only the input, lstm, dropout and dense layers...
The trainning seem to work but all layer are active? How can I get the full summary??
TimeDistributed
is also a layer and needs to be connected to the input – Stefan Dragnev