Skip to content

Commit

Permalink
clip before softplus
Browse files Browse the repository at this point in the history
  • Loading branch information
davek44 committed Sep 16, 2017
1 parent 94242e5 commit 918492b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion basenji/seqnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def build(self, job):
self.preds_op = tf.where(seqs_repr > 0, seqs_repr + 1, tf.exp(tf.clip_by_value(seqs_repr,-50,50)), name='preds')

elif self.link == 'softplus':
self.preds_op = tf.nn.softplus(seqs_repr, name='preds')
self.preds_op = tf.nn.softplus(tf.clip_by_value(seqs_repr,-50,50), name='preds')

elif self.link == 'softmax':
# performed in the loss function, but saving probabilities
Expand Down

0 comments on commit 918492b

Please sign in to comment.