"model/models/git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "0263ad9b6dfd31f99915fda5531b908511db5b42"
Unverified Commit 03cea2b4 authored by marsggbo's avatar marsggbo Committed by GitHub
Browse files

fix issue #2091 (#2107)



* fix EnasMutator LSTMCell forward bug

fix issue #2091

* add comment
Co-authored-by: default avatarQuanluZhang <z.quanluzhang@gmail.com>
parent 6164207e
...@@ -23,7 +23,9 @@ class StackedLSTMCell(nn.Module): ...@@ -23,7 +23,9 @@ class StackedLSTMCell(nn.Module):
curr_c, curr_h = m(inputs, (prev_c[i], prev_h[i])) curr_c, curr_h = m(inputs, (prev_c[i], prev_h[i]))
next_c.append(curr_c) next_c.append(curr_c)
next_h.append(curr_h) 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 return next_c, next_h
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment