Keras LSTM-RNN layer
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- java, tensorflow
- Domain
- machine-learning
Research direction
No files or tests are named. Start by reviewing issue #270 and the existing tensorflow-framework APIs around the Keras-style LSTM/RNN layer request. Done means establishing whether the requested high-level LSTM API belongs in this repository and defining its implementation scope.
Written by the indexing model from the issue text.
Description
Please make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template
System information
- TensorFlow version (you are using): 2.3.1
- Are you willing to contribute it (Yes/No): Yes, when able and available
Describe the feature and the current behavior/state.
There is a high-level API on Keras to LSTM layers on top of RNN that allows getting LSTM output as simple as this:
lstm_module = LSTMModule(5)
lstm_input = tf.constant([[0.1, 0.2], [0.3, 0.4]], shape=[1, 2, 2])
lstm_output = lstm_module(lstm_input)
A definition of the LSTM Layer with Model Subclassing API from Tensorflow:
class LSTMModule(tf.keras.layers.Layer):
def __init__(self, lstm_dims):
super().__init__()
self.lstm_dims = lstm_dims
self.lstm = LSTM(lstm_dims, return_sequences=True, return_state=True)
def call(self, inputs):
# Forward pass
ini_hidden_state = tf.zeros(shape=[1, self.lstm_dims]), tf.zeros(shape=[1, self.lstm_dims])
return self.get_lstm_output(self.lstm, inputs, ini_hidden_state)
@staticmethod
def get_lstm_output(lstm_model, input_sequence, initial_state):
output = lstm_model(input_sequence, initial_state=initial_state)
hidden_states, hidden_state, cell_state = output[0], output[1], output[2]
return hidden_states, hidden_state, cell_state
Will this change the current api? How?
This will add a new feature to tensorflow-framework module.
Who will benefit with this feature?
Anyone that requires deep learning to solve sequence classification and prediction problems and everyone who is already familiar with Keras.
Any Other info.
This feature comes from #270
- Dominant language
- Java
- Stars
- 928
- Forks
- 227
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tensorflow/java
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
tensorflow/java#653 · 1 comment · 4 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
tensorflow/java#621 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
tensorflow/java#617 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
tensorflow/java#615 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
tensorflow/java#614 · 1 comment ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100