0

I trying to develop an sensors classification model that takes two of the sensors data as input, each of a size DM_sensor.shape:(3450, 3, 1) NDM_sensor.shape:(3450, 3, 1) When I do not include TimeDistributed is works fine, however when include TimeDistributed it gives error that mention below the codes.

visible1 = Input(shape=(DM_sensor.shape[1:]))
conv11 = (TimeDistributed(Conv1D(padding = 'same', filters = 3, kernel_size 
= 3, activation = 'relu')))(visible1)
pool11 = MaxPooling1D(pool_size = 2)(conv11)
flat1 = Flatten()(pool11)


visible2 = Input(shape=(NDM_sensor.shape[1:]))
conv21 = (TimeDistributed(Conv1D(padding = 'same', filters = 3, kernel_size 
= 3, activation = 'relu')))(visible2)
pool21 =  MaxPooling1D(pool_size = 2)(conv21)

flat2 = Flatten()(pool21)
merge = concatenate([flat1, flat2])

# interpretation model
hidden1 = Dense(10, activation='relu')(merge)
hidden2 = Dense(10, activation='relu')(hidden1)
output = Dense(num_classes,activation='softmax')(hidden2)


model = Model(inputs=[visible1, visible2], outputs=output)
# summarize layers
print(model.summary())


IndexError: tuple index out of range
user8863227
  • 37
  • 1
  • 1
  • 2

0 Answers0