def foo(inputs_):
lstm1 = keras.layers.LSTM(units= 24, return_sequences=True, return_state=True,name='DecoderLSTM')
st1,st2 = keras.layers.Lambda(lambda x:lstm1.get_initial_state(x))(inputs_)
st1 = keras.layers.Lambda(lambda inp: K.expand_dims(inp, axis=1) )(st1)
d_init, _, _ = lstm1(inputs_)
d_t = keras.layers.Concatenate(axis=1)([st1, d_init])
return d_t
dec_input = keras.Input((32,1))
out = foo(dec_input)
m = keras.Model(dec_input,out)