ntt123 commited on
Commit
92af6f9
1 Parent(s): 89ca6ce

Update script.js

Browse files
Files changed (1) hide show
  1. script.js +1 -1
script.js CHANGED
@@ -143,7 +143,7 @@ var dojob = function(run_id) {
143
  tf.dispose(gru0_hx_);
144
  const att_inp = tf.concat([att_context, input, out_0], 1);
145
  const att_params = tf.add(tf.matMul(att_inp, att_w), att_b);
146
- [alpha,beta,kappa] = tf.split(tf.softplus(att_params), 3, 1);
147
  att_location_ = att_location;
148
  att_location = tf.add(att_location, tf.div(kappa, 25.));
149
  tf.dispose(att_location_)
 
143
  tf.dispose(gru0_hx_);
144
  const att_inp = tf.concat([att_context, input, out_0], 1);
145
  const att_params = tf.add(tf.matMul(att_inp, att_w), att_b);
146
+ [alpha,beta,kappa] = tf.split(tf.log(tf.add(tf.exp(att_params), 1.)), 3, 1);
147
  att_location_ = att_location;
148
  att_location = tf.add(att_location, tf.div(kappa, 25.));
149
  tf.dispose(att_location_)