Skip to content

Commit 4d0b426

Browse files
authored
Merge pull request #1968 from oysteinsolheim/master
fast sigmoid
2 parents 1f82da4 + b8c03d1 commit 4d0b426

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/layers/recurrent.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ Recur(m::LSTMCell) = Recur(m, m.state0)
281281
# GRU
282282

283283
function _gru_output(gxs, ghs, bs)
284-
r = @. σ(gxs[1] + ghs[1] + bs[1])
285-
z = @. σ(gxs[2] + ghs[2] + bs[2])
284+
r = @. sigmoid_fast(gxs[1] + ghs[1] + bs[1])
285+
z = @. sigmoid_fast(gxs[2] + ghs[2] + bs[2])
286286
return r, z
287287
end
288288

0 commit comments

Comments
 (0)