Git Product home page Git Product logo

plstm's People

Contributors

enny1991 avatar jamessergeant avatar vivanov10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plstm's Issues

multiPLSTM and RNN doesn't parameterize the cell correctly

multiPLSTM and RNN doesn't parameterize the cell correctly.

multiPLSTM basically hardcode to cell = PhasedLSTMCell(units_p_layer, use_peepholes=True, state_is_tuple=True) so the params such as r_on, tau_init cannot be passed in.

Also in simplePhasedLSTM.py, the RNN function always creates PLSTM cell, not LSTM or GRU. This means that the run flag is not used flags.DEFINE_string("unit", "PLSTM", "Can be PSLTM, LSTM, GRU").

I'm happy to contribute a fix.

Time in input sequence

Hey!

I am confused about one thing, the time should be in the first position of the input tensor right? For example, if I have a input tensor of shape (?, seq_len, nb_features), [:, :, 0] would be the times.

having trouble to use it

i am trying to make a plstm_classifier using the code of https://github.com/guillaume-chevalier/LSTM-Human-Activity-Recognition and your plsm cells.
i'm having troubles understanding the needed dimensions and params..

I added how i've tried oto combine it, basically this change:

Define two stacked PLSTM cells (two recurrent layers deep) with tensorflow

lstm_cell_1 = PhasedLSTMCell(config.n_hidden)
lstm_cell_2 = PhasedLSTMCell(config.n_hidden)
# Previous lstm cells for lstm model
#lstm_cell_1 = tf.contrib.rnn.BasicLSTMCell(config.n_hidden, forget_bias=1.0, state_is_tuple=True)
#lstm_cell_2 = tf.contrib.rnn.BasicLSTMCell(config.n_hidden, forget_bias=1.0, state_is_tuple=True)
#lstm_cells = tf.contrib.rnn.MultiRNNCell([lstm_cell_1, lstm_cell_2], state_is_tuple=True)
initial_states = [LSTMStateTuple(tf.zeros([config.batch_size, config.n_hidden], tf.float32), tf.zeros([config.batch_size, config.n_hidden], tf.float32)) for _ in range(config.n_inputs)]
# Get PLSTM cell output
outputs, states = multiPLSTM([lstm_cell_1, lstm_cell_2], _X, config.n_steps,config.n_inputs, initial_states)
# Previous lstm cell output before change - for stm moder
#outputs, states = tf.contrib.rnn.static_rnn(lstm_cells, _X, dtype=tf.float32)

But i encounter lots if issues which i hoe can be solved easily..

SOS pls :)

error1.txt
error2.txt
plstm_classifier.txt

Possible bug in the PLSTM

The Kronos gate is applied at the end.

# APPLY KRONOS GATE
c = k * c + (1. - k) * c_prev
m = k * m + (1. - k) * m_prev
# END KRONOS GATE

But I think the output o from Equation (4) should be updated with the value computed in the Equation (8).
For now it's updated with c_tilde I guess.

https://arxiv.org/pdf/1610.09513v1.pdf

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

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.

Error RNNCell is not defined

Hi,

First thanks for converting the original code to TF. I get the following error when running the test script:

python simplePhasedLSTM.py:

Traceback (most recent call last):
File "simplePhasedLSTM.py", line 6, in
from PhasedLSTMCell import PhasedLSTMCell, multiPLSTM
File "/Users/new/plstm/PhasedLSTMCell.py", line 91, in
class PhasedLSTMCell(RNNCell):
NameError: name 'RNNCell' is not defined

I am using tf 1.2.1 and python 2.7.13

TF 2

Hello,
Have you done re-writing your code for TF2?

thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.