Closed uttamdhakal closed 5 years ago
so if the choice returns 'three', what you do is connect an LSTM with 3D output to a Dense layer, essentially. try something like
...
else:
model.add(Flatten())
...
in any case, this isn't really a hyperas problem. I can't take away the work to validate that your network layers "fit together". In any case, next time please provide a stack trace so I can see what fails. better yet, a reproducible example.
I think the problem lies in
return_sequences
, if I want to stack LSTM layersreturn_sequences
needs to beTrue
for first LSTM layers but I want to optimize the number of LSTM layers so I don't know how to get around that.I have this simple model, the program runs for certain iteration(while it checks for other parameters) but throws an error as soon as it tries to test LSTM layers.