Enny1991 / PLSTM

137 stars 32 forks source link

Ability to manually set and disable learning of tau, r_on and s? #6

Closed jamessergeant closed 7 years ago

jamessergeant commented 7 years ago

As per the Lip Reading experiment in the paper, it would be ideal to have the ability to manually set and disable learning of Tau and s.

I'm currently having a go at it myself but am only new to TensorFlow. I have added a new boolean input argument to PhasedLSTMCell.

Based on this parameter being True, I've modified the following:

  1. Set get_variable trainable to True for tau, r_on and s
  2. Initialize tau and s with init_ops.constant_initializer in place of the random methods, setting each to tau_init and 0, respectively.
  3. Set a hard on period for gate by using:
    k = tf.select(tf.logical_or(is_up,is_down), tf.to_float(is_up), self.alpha * phi)

    Would appreciate any comments on this method and am happy to contribute.

jamessergeant commented 7 years ago

@Enny1991 FYI in case you haven't seen it https://channel9.msdn.com/Events/Neural-Information-Processing-Systems-Conference/Neural-Information-Processing-Systems-Conference-NIPS-2016/Phased-LSTM-Accelerating-Recurrent-Network-Training-for-Long-or-Event-based-Sequences