Training a dense layer along with an lstm layer
26 views (last 30 days)
Yildirim Kocoglu on 7 Jan 2021
I'm trying to set my initial hidden states in the lstm network using a dense layer but, I have been having problems with using multiple inputs in my network. The flow of the network looks something like below. The dense layer between static features (input) and init_hidden_states should be trainable. So far, I tried using a DAG network but, failed due to an error (If there is sequential input layer, there can't be any other input layer present). In my case the sequential input layer is used for time series input and I'm using an image input layer to input the static features. Any advice or example is appreciated. Thank you.
Asvin Kumar on 9 Feb 2021
I suppose what you're asking for is to have an LSTM layer in which the initial values of hidden state is trainable. If that's the case, I'm afraid this is not currently possible. The initial value of hidden state of an LSTM is a property of the layer, the 'HiddenState' property, and it is a state parameter which is not learnable.