Skip to content

Commit 99994ad

Browse files
MartinXPNmahnerak
authored andcommitted
added missing sigmoid activation
1 parent dce82f7 commit 99994ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

layers/QuestionAttnGRU.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def step(self, inputs, states):
4848
c_t = K.batch_dot(a_t, uQ, axes=[1, 1])
4949

5050
GRU_inputs = K.concatenate([uP_t, c_t])
51-
g = K.dot(GRU_inputs, W_g1) # W_g1
51+
g = K.sigmoid(K.dot(GRU_inputs, W_g1)) # W_g1
5252
GRU_inputs = g * GRU_inputs
5353
vP_t, s = super(QuestionAttnGRU, self).step(GRU_inputs, states)
5454

layers/SelfAttnGRU.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def step(self, inputs, states):
5050
c_t = K.batch_dot(a_t, vP, axes=[1, 1])
5151

5252
GRU_inputs = K.concatenate([vP_t, c_t])
53-
g = K.dot(GRU_inputs, W_g2)
53+
g = K.sigmoid(K.dot(GRU_inputs, W_g2))
5454
GRU_inputs = g * GRU_inputs
5555

5656
hP_t, s = super(SelfAttnGRU, self).step(GRU_inputs, states)

0 commit comments

Comments
 (0)