I have the hierarchical input data in format -
input_x = [[1,2,11] , [0, 22, 33] , [0,44,10] , [9,1,32]] target_x = [0.2 , 0.4 , 0.7 ,0.3] Currently , I am implementing the below hierarchical seq model -
input_x = [[1,2,11] , [0, 22, 33] , [0,44,10] , [9,1,32]] target_x = [0.2 , 0.4 , 0.7 ,0.3]
x = Input(shape=(**4**, 3,1)) encoded_rows = TimeDistributed(LSTM(row_hidden))(x) encoded_columns = LSTM(col_hidden)(encoded_rows) prediction = Dense(**4**, activation='softmax')(encoded_columns) model = Model(x, prediction) model.compile(loss='categorical_crossentropy', optimizer='rmsprop', metrics=['accuracy'])
The input len and output len (in dense layer) differs for all observations - the model can be trained for varied length inputs-outputs by using batches of different lengths.
Question is Can I use the trained models on dynamic lengths for predicting on varied length inputs for test data as well?
Thanks
I don't think there's enough context in here to be able to answer properly, I'm not entirely sure what you're trying to do. Is there a github or similar repository to point to, and maybe a little more on what and how you're trying to achieve?