Fix nn.GRU skipping bhn bias when hidden is None (#3252)
Co-authored-by: mm65x <[email protected]>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user