Skip to content

Commit

Permalink
fix dgcnn mask is none
Browse files Browse the repository at this point in the history
  • Loading branch information
xv44586 committed Oct 12, 2020
1 parent a638f82 commit 4ad480d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions toolkit4nlp/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ def call(self, x, mask=None):
if self.dropout_rate is not None:
g = K.in_train_phase(K.dropout(g, self.dropout_rate), g)
g = K.sigmoid(g)
# mask is none
mask = mask if mask is not None else K.ones_like(x)

if self.skip_connection:
if K.int_shape(x0)[-1] != self.o_dim:
x0 = self.conv1d_1x1(x0)
Expand Down

0 comments on commit 4ad480d

Please sign in to comment.