title: How to encode a span in a text sequence by tf.keras.layers.LSTM
body: <p>I am new to <code>tf.keras</code> functional API. I am now building a model which encodes certain span of words in a sentence sequence by layers of LSTM. For example, the input is: <code>[None, max_sent_len, word_embedding_dim]</code>, span: <code>[2, 5]</code> should pass the word of <code>index[2,3,4]</code> into a LSTM layer and output the last hidden layer. Is there any function in <code>tf.keras</code> that can build this easily? Or should I use low level tensorflow to build this?</p>