Fix nn.GRU skipping bhn bias when hidden is None (#3252)

Co-authored-by: mm65x <[email protected]>
This commit is contained in:
mm65x
2026-03-16 13:28:14 -07:00
committed by GitHub
co-authored by mm65x
parent 505fc9850d
commit f226eeec9e
2 changed files with 10 additions and 0 deletions
+2
View File
@@ -184,6 +184,8 @@ class GRU(Module):
if hidden is not None:
n = n + r * h_proj_n
elif self.bhn is not None:
n = n + r * self.bhn
n = mx.tanh(n)
if hidden is not None: