Keras LSTM-RNN layer
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- java, tensorflow
调研方向
未指定文件或测试。首先审查 issue #270,以及现有的、与 Keras 风格 LSTM/RNN 层请求相关的 tensorflow-framework API。完成的标准是确定所请求的高级 LSTM API 是否属于此仓库,并定义其实现范围。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Java
- 星标
- 928
- 派生
- 227
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tensorflow/java 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
tensorflow/java#653 · 1 条评论 · 4 个 reaction ·
-
难度 5/5 一周以上 新手友好度 25/100
tensorflow/java#621 · 4 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
tensorflow/java#617 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 55/100
tensorflow/java#615 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
tensorflow/java#614 · 1 条评论 ·
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
apache/cloudstack#14222 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
1.0.0-alpha2 Type/Improvement
难度 2/5 1-3 小时 新手友好度 68/100
wso2/dpdp-accelerator#272 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
infinispan/infinispan#18150 ·
-
area/frontend
难度 2/5 1-3 小时 新手友好度 65/100