Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Is StackedLSTMCell correct implementation? #2839

Closed
jyh2986 opened this issue Aug 29, 2020 · 1 comment · Fixed by #2842
Closed

Is StackedLSTMCell correct implementation? #2839

jyh2986 opened this issue Aug 29, 2020 · 1 comment · Fixed by #2842
Assignees
Labels
bug Something isn't working NAS

Comments

@jyh2986
Copy link
Contributor

jyh2986 commented Aug 29, 2020

For enas, StackedLSTMCell is implemented as below

curr_c, curr_h = m(inputs, (prev_c[i], prev_h[i]))
next_c.append(curr_c)
next_h.append(curr_h)
# current implementation only supports batch size equals 1,
# but the algorithm does not necessarily have this limitation
inputs = curr_h[-1].view(1, -1)

nn.LSTMCell outputs (hidden state, cell state) but the order of output is changed in the implementation.
As a result, the cell state is used for output of LSTM.

Is this an intention or wrong implementation?

@ultmaster
Copy link
Contributor

Hi @jyh2986. Thanks for asking.

If you are right, the implementation is definitely buggy. You can raise a PR. Meanwhile, I'll check the PyTorch documentation for verification. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working NAS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants