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

Commit

Permalink
fix issue #2091 (#2107)
Browse files Browse the repository at this point in the history
* fix EnasMutator LSTMCell forward bug

fix issue #2091

* add comment

Co-authored-by: QuanluZhang <[email protected]>
  • Loading branch information
marsggbo and QuanluZhang authored Feb 29, 2020
1 parent 6164207 commit 03cea2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sdk/pynni/nni/nas/pytorch/enas/mutator.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ def forward(self, inputs, hidden):
curr_c, curr_h = m(inputs, (prev_c[i], prev_h[i]))
next_c.append(curr_c)
next_h.append(curr_h)
inputs = curr_h[-1]
# current implementation only supports batch size equals 1,
# but the algorithm does not necessarily have this limitation
inputs = curr_h[-1].view(1, -1)
return next_c, next_h


Expand Down

0 comments on commit 03cea2b

Please sign in to comment.