ntt123 commited on
Commit
7b89eb7
1 Parent(s): 1fe5c3f

Update script.js

Browse files
Files changed (1) hide show
  1. script.js +1 -1
script.js CHANGED
@@ -23,7 +23,7 @@ var rand_truncated_normal = function(low, high) {
23
 
24
  var softplus = function(x) {
25
  const m = tf.maximum(x, 0.0);
26
- return tf.add(m, tf.log(tf.add(tf.exp(-m), tf.exp(x-m))));
27
  }
28
 
29
 
 
23
 
24
  var softplus = function(x) {
25
  const m = tf.maximum(x, 0.0);
26
+ return tf.add(m, tf.log(tf.add(tf.exp(tf.neg(m)), tf.exp(tf.sub(x, m)))));
27
  }
28
 
29