Can somebody explain me the the following parameters of Keras LSTM layer The Next CEO of Stack Overflow2019 Community Moderator ElectionClarification on the Keras Recurrent Unit CellReformatting data for future time series prediction LSTM(Keras)TypeError: unsupported operand type(s) for %: 'int' and 'NoneType'(Stateful LSTM Keras)LSTM not learning with extra nontemporal data added after LSTM layer - KerasBatch Size of Stateful LSTM in kerasLSTM with teacher forcing - NN fails to predict the sequenceWhat does GlobalMaxPooling1D() do to output of LSTM unit in Keras?Can't understand Output shape of a Dense layer - kerasHow to implement keras LSTM time seriesWhat is the difference between “Adding more LSTM layers” or “Adding more units on existence layers”?
How can I get through very long and very dry, but also very useful technical documents when learning a new tool?
How do I go from 300 unfinished/half written blog posts, to published posts?
What makes a siege story/plot interesting?
Why does standard notation not preserve intervals (visually)
What is the difference between "behavior" and "behaviour"?
India just shot down a satellite from the ground. At what altitude range is the resulting debris field?
How to make a variable always equal to the result of some calculations?
Why doesn't a table tennis ball float on a surface of steel balls? How do we calculate buoyancy here?
Does it take more energy to get to Venus or to Mars?
Complex fractions
How to be diplomatic in refusing to write code that breaches the privacy of our users
Horror movie/show or scene where a horse creature opens its mouth really wide and devours a man in a stables
Title page not generated
Monthly twice production release for my software project
Was a professor correct to chastise me for writing "Prof. X" rather than "Professor X"?
What is the point of a new vote on May's deal when the indicative votes suggest she will not win?
How to Reset Passwords on Multiple Websites Easily?
What does "Its cash flow is deeply negative" mean?
Implement the Thanos sorting algorithm
Why did we only see the N-1 starfighters in one film?
Is HostGator storing my password in plaintext?
Science fiction short story involving a paper written by a schizophrenic
If/When UK leaves the EU, can a future goverment do a referendum to join EU
Apart from "berlinern", do any other German dialects have a corresponding verb?
Can somebody explain me the the following parameters of Keras LSTM layer
The Next CEO of Stack Overflow2019 Community Moderator ElectionClarification on the Keras Recurrent Unit CellReformatting data for future time series prediction LSTM(Keras)TypeError: unsupported operand type(s) for %: 'int' and 'NoneType'(Stateful LSTM Keras)LSTM not learning with extra nontemporal data added after LSTM layer - KerasBatch Size of Stateful LSTM in kerasLSTM with teacher forcing - NN fails to predict the sequenceWhat does GlobalMaxPooling1D() do to output of LSTM unit in Keras?Can't understand Output shape of a Dense layer - kerasHow to implement keras LSTM time seriesWhat is the difference between “Adding more LSTM layers” or “Adding more units on existence layers”?
$begingroup$
keras.layers.LSTM(units,stateful=False,unroll=False)
What units,stateful and unroll represents here??
deep-learning keras lstm
New contributor
$endgroup$
add a comment |
$begingroup$
keras.layers.LSTM(units,stateful=False,unroll=False)
What units,stateful and unroll represents here??
deep-learning keras lstm
New contributor
$endgroup$
1
$begingroup$
You may want to see here.
$endgroup$
– Media
Mar 22 at 19:30
$begingroup$
These are explained in Keras documentation, is that documentation ambiguous ?
$endgroup$
– Shamit Verma
Mar 23 at 8:56
$begingroup$
No docs are not ambiguous but i am getting it from there thats y i asked it.
$endgroup$
– suraj
Mar 23 at 15:41
add a comment |
$begingroup$
keras.layers.LSTM(units,stateful=False,unroll=False)
What units,stateful and unroll represents here??
deep-learning keras lstm
New contributor
$endgroup$
keras.layers.LSTM(units,stateful=False,unroll=False)
What units,stateful and unroll represents here??
deep-learning keras lstm
deep-learning keras lstm
New contributor
New contributor
New contributor
asked Mar 22 at 19:02
surajsuraj
91
91
New contributor
New contributor
1
$begingroup$
You may want to see here.
$endgroup$
– Media
Mar 22 at 19:30
$begingroup$
These are explained in Keras documentation, is that documentation ambiguous ?
$endgroup$
– Shamit Verma
Mar 23 at 8:56
$begingroup$
No docs are not ambiguous but i am getting it from there thats y i asked it.
$endgroup$
– suraj
Mar 23 at 15:41
add a comment |
1
$begingroup$
You may want to see here.
$endgroup$
– Media
Mar 22 at 19:30
$begingroup$
These are explained in Keras documentation, is that documentation ambiguous ?
$endgroup$
– Shamit Verma
Mar 23 at 8:56
$begingroup$
No docs are not ambiguous but i am getting it from there thats y i asked it.
$endgroup$
– suraj
Mar 23 at 15:41
1
1
$begingroup$
You may want to see here.
$endgroup$
– Media
Mar 22 at 19:30
$begingroup$
You may want to see here.
$endgroup$
– Media
Mar 22 at 19:30
$begingroup$
These are explained in Keras documentation, is that documentation ambiguous ?
$endgroup$
– Shamit Verma
Mar 23 at 8:56
$begingroup$
These are explained in Keras documentation, is that documentation ambiguous ?
$endgroup$
– Shamit Verma
Mar 23 at 8:56
$begingroup$
No docs are not ambiguous but i am getting it from there thats y i asked it.
$endgroup$
– suraj
Mar 23 at 15:41
$begingroup$
No docs are not ambiguous but i am getting it from there thats y i asked it.
$endgroup$
– suraj
Mar 23 at 15:41
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
units
: According to the official docs, it defines the output dimensionality. In simple words, the number of LSTM units which will be used.
units: Positive integer, dimensionality of the output space.
Units are nothing but the LSTM cells which will be used to process the inputs.
stateful
:
According to the docs :
stateful: Boolean (default False). If True, the last state for each sample at index i in a batch will be used as initial state for the sample of index i in the following batch.
If this argument is set to False then, the states or the memory of the LSTM cell will get reset at every sample which is passed through it. It follows this manner:
- Take a sample from the batch.
- The sample will pass through the LSTM and produce a state vector ( conditional memory ).
- The output is given
- If
stateful=True
then, the state vector will be used as the initial state for the 2nd sample. - If
stateful=False
then, a new state vector will be used for the 2nd sample.
Hence, the memory should migrate from one sample to another is decided by the stateful
argument.
unroll
:
According to the docs,
unroll: Boolean (default False). If True, the network will be unrolled, else a symbolic loop will be used. Unrolling can speed-up a RNN, although it tends to be more memory-intensive. Unrolling is only suitable for short sequences.
It can thought as :
RNNs, once unfolded in time, can be seen as very deep feedforward networks in which all the layers share the same weights. ( Deep Learning, Nature, 2015 )
You can read an excellent article here.
The unrolling will the make the LSTM, a deep feed forward network which has shared weights. You can see and understand through this figure.
$endgroup$
$begingroup$
Thank you so much Subham ✌✌👍
$endgroup$
– suraj
Mar 23 at 15:41
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "557"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
suraj is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f47809%2fcan-somebody-explain-me-the-the-following-parameters-of-keras-lstm-layer%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
units
: According to the official docs, it defines the output dimensionality. In simple words, the number of LSTM units which will be used.
units: Positive integer, dimensionality of the output space.
Units are nothing but the LSTM cells which will be used to process the inputs.
stateful
:
According to the docs :
stateful: Boolean (default False). If True, the last state for each sample at index i in a batch will be used as initial state for the sample of index i in the following batch.
If this argument is set to False then, the states or the memory of the LSTM cell will get reset at every sample which is passed through it. It follows this manner:
- Take a sample from the batch.
- The sample will pass through the LSTM and produce a state vector ( conditional memory ).
- The output is given
- If
stateful=True
then, the state vector will be used as the initial state for the 2nd sample. - If
stateful=False
then, a new state vector will be used for the 2nd sample.
Hence, the memory should migrate from one sample to another is decided by the stateful
argument.
unroll
:
According to the docs,
unroll: Boolean (default False). If True, the network will be unrolled, else a symbolic loop will be used. Unrolling can speed-up a RNN, although it tends to be more memory-intensive. Unrolling is only suitable for short sequences.
It can thought as :
RNNs, once unfolded in time, can be seen as very deep feedforward networks in which all the layers share the same weights. ( Deep Learning, Nature, 2015 )
You can read an excellent article here.
The unrolling will the make the LSTM, a deep feed forward network which has shared weights. You can see and understand through this figure.
$endgroup$
$begingroup$
Thank you so much Subham ✌✌👍
$endgroup$
– suraj
Mar 23 at 15:41
add a comment |
$begingroup$
units
: According to the official docs, it defines the output dimensionality. In simple words, the number of LSTM units which will be used.
units: Positive integer, dimensionality of the output space.
Units are nothing but the LSTM cells which will be used to process the inputs.
stateful
:
According to the docs :
stateful: Boolean (default False). If True, the last state for each sample at index i in a batch will be used as initial state for the sample of index i in the following batch.
If this argument is set to False then, the states or the memory of the LSTM cell will get reset at every sample which is passed through it. It follows this manner:
- Take a sample from the batch.
- The sample will pass through the LSTM and produce a state vector ( conditional memory ).
- The output is given
- If
stateful=True
then, the state vector will be used as the initial state for the 2nd sample. - If
stateful=False
then, a new state vector will be used for the 2nd sample.
Hence, the memory should migrate from one sample to another is decided by the stateful
argument.
unroll
:
According to the docs,
unroll: Boolean (default False). If True, the network will be unrolled, else a symbolic loop will be used. Unrolling can speed-up a RNN, although it tends to be more memory-intensive. Unrolling is only suitable for short sequences.
It can thought as :
RNNs, once unfolded in time, can be seen as very deep feedforward networks in which all the layers share the same weights. ( Deep Learning, Nature, 2015 )
You can read an excellent article here.
The unrolling will the make the LSTM, a deep feed forward network which has shared weights. You can see and understand through this figure.
$endgroup$
$begingroup$
Thank you so much Subham ✌✌👍
$endgroup$
– suraj
Mar 23 at 15:41
add a comment |
$begingroup$
units
: According to the official docs, it defines the output dimensionality. In simple words, the number of LSTM units which will be used.
units: Positive integer, dimensionality of the output space.
Units are nothing but the LSTM cells which will be used to process the inputs.
stateful
:
According to the docs :
stateful: Boolean (default False). If True, the last state for each sample at index i in a batch will be used as initial state for the sample of index i in the following batch.
If this argument is set to False then, the states or the memory of the LSTM cell will get reset at every sample which is passed through it. It follows this manner:
- Take a sample from the batch.
- The sample will pass through the LSTM and produce a state vector ( conditional memory ).
- The output is given
- If
stateful=True
then, the state vector will be used as the initial state for the 2nd sample. - If
stateful=False
then, a new state vector will be used for the 2nd sample.
Hence, the memory should migrate from one sample to another is decided by the stateful
argument.
unroll
:
According to the docs,
unroll: Boolean (default False). If True, the network will be unrolled, else a symbolic loop will be used. Unrolling can speed-up a RNN, although it tends to be more memory-intensive. Unrolling is only suitable for short sequences.
It can thought as :
RNNs, once unfolded in time, can be seen as very deep feedforward networks in which all the layers share the same weights. ( Deep Learning, Nature, 2015 )
You can read an excellent article here.
The unrolling will the make the LSTM, a deep feed forward network which has shared weights. You can see and understand through this figure.
$endgroup$
units
: According to the official docs, it defines the output dimensionality. In simple words, the number of LSTM units which will be used.
units: Positive integer, dimensionality of the output space.
Units are nothing but the LSTM cells which will be used to process the inputs.
stateful
:
According to the docs :
stateful: Boolean (default False). If True, the last state for each sample at index i in a batch will be used as initial state for the sample of index i in the following batch.
If this argument is set to False then, the states or the memory of the LSTM cell will get reset at every sample which is passed through it. It follows this manner:
- Take a sample from the batch.
- The sample will pass through the LSTM and produce a state vector ( conditional memory ).
- The output is given
- If
stateful=True
then, the state vector will be used as the initial state for the 2nd sample. - If
stateful=False
then, a new state vector will be used for the 2nd sample.
Hence, the memory should migrate from one sample to another is decided by the stateful
argument.
unroll
:
According to the docs,
unroll: Boolean (default False). If True, the network will be unrolled, else a symbolic loop will be used. Unrolling can speed-up a RNN, although it tends to be more memory-intensive. Unrolling is only suitable for short sequences.
It can thought as :
RNNs, once unfolded in time, can be seen as very deep feedforward networks in which all the layers share the same weights. ( Deep Learning, Nature, 2015 )
You can read an excellent article here.
The unrolling will the make the LSTM, a deep feed forward network which has shared weights. You can see and understand through this figure.
answered Mar 23 at 8:27
Shubham PanchalShubham Panchal
36118
36118
$begingroup$
Thank you so much Subham ✌✌👍
$endgroup$
– suraj
Mar 23 at 15:41
add a comment |
$begingroup$
Thank you so much Subham ✌✌👍
$endgroup$
– suraj
Mar 23 at 15:41
$begingroup$
Thank you so much Subham ✌✌👍
$endgroup$
– suraj
Mar 23 at 15:41
$begingroup$
Thank you so much Subham ✌✌👍
$endgroup$
– suraj
Mar 23 at 15:41
add a comment |
suraj is a new contributor. Be nice, and check out our Code of Conduct.
suraj is a new contributor. Be nice, and check out our Code of Conduct.
suraj is a new contributor. Be nice, and check out our Code of Conduct.
suraj is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Data Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f47809%2fcan-somebody-explain-me-the-the-following-parameters-of-keras-lstm-layer%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
You may want to see here.
$endgroup$
– Media
Mar 22 at 19:30
$begingroup$
These are explained in Keras documentation, is that documentation ambiguous ?
$endgroup$
– Shamit Verma
Mar 23 at 8:56
$begingroup$
No docs are not ambiguous but i am getting it from there thats y i asked it.
$endgroup$
– suraj
Mar 23 at 15:41