# Building LSTM

**URL:** <https://discourse.julialang.org/t/building-lstm/3153>\
**Category:** Machine Learning\
**Tags:** tensorflow\
**Created:** [April 10, 2017, 10:44pm UTC](https://discourse.julialang.org/t/building-lstm/3153 "2017-04-10T22:44:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hpoit](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hpoit/32/245_2.png) [@hpoit](https://discourse.julialang.org/u/hpoit)\
**Post date:** [April 10, 2017, 10:44pm UTC](https://discourse.julialang.org/t/building-lstm/3153/1 "2017-04-10T22:44:32Z")

</div>

How do I build the LSTM cell? Is it `nn.rnn.LSTMCell(input, state, input_dim=-1)` ?

Can I add that under RNN in [https://github.com/malmaud/TensorFlow.jl/blob/master/docs/src/ops.md](https://github.com/malmaud/TensorFlow.jl/blob/master/docs/src/ops.md) ?

@malmaud

---

<div class="post-metadata">

**Author:** ![hpoit](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hpoit/32/245_2.png) [@hpoit](https://discourse.julialang.org/u/hpoit)\
**Post date:** [April 11, 2017, 12:16pm UTC](https://discourse.julialang.org/t/building-lstm/3153/2 "2017-04-11T12:16:24Z")

</div>

Hi @malmaud, I found `cell = nn.rnn_cell.LSTMCell(10)` in your [tests](https://github.com/malmaud/TensorFlow.jl/blob/master/test/nn.jl#L80), but I don’t think anywhere else.

I’m still a little uncertain about the form of the arguments, will study the code further.

Can I somehow do `cell = nn.rnn_cell.LSTMCell(options.num_units, state_is_tuple = True, forget_bias = 0.0)`? The format of the arguments don’t have to be this way.
