lstm - Many to one implementation in keras -


i trying implement many 1 model inputs word vectors of size d . need output vector of size d @ end of lstm .

enter image description here

in question , mentioned use(for many 1 model)

model = sequential() model.add(lstm(1, input_shape=(timesteps, data_dim))) 

i still doubtful how specify input , more importantly output dimensions in keras model

the code provided one-to-many scenario - output of size 1. if want have output of size d need try following code:

model = sequential() model.add(lstm(d, input_shape=(len_seq, d))) 

moreover - word vectors advise use embedding layer designed use case. use input lstm then.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -