plstm's People
Forkers
benjamesbabala vyraun ml-lab codeaudit ajaytalati timwee tonydeep vivanov879 alinaag pengchengai hedgefair jdc08161063 leedaga allensmile ominux algoskynet slasnista caomw jamessergeant dahlia05 aht angusg leezqcst woshiwanglitao afcarl williemaddox yingmuying lucksong youngbaymax lufengjie051523 runngezhang-jxplstm'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.
AttributeError: 'module' object has no attribute 'select'
Looks like this has gone out of the window in tensorflow 1.0, tensorflow/tensorflow#6899
how to remember states with multi layer PLSTM
Hi, How to remember states of lstm between runs?
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 :)
Running Error in PLSTM: No gradient defined for operation '3/rnn/while/PhasedLSTMCell/FloorMod_1'
Hi Enny1991:
I am using tensorflow of version 0.12.head and I encounter an error:
LookupError: No gradient defined for operation '3/rnn/while/PhasedLSTMCell/FloorMod_1' (op type: FloorMod)
while execute line 202 in simplePhasedLSTM.py ---- grads = tf.gradients(cost, tvars)
But I can't find the op FloorMod
anywhere.
How can I solve this problem? Thanks a lot!
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.
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:
- Set get_variable trainable to True for tau, r_on and s
- Initialize tau and s with
init_ops.constant_initializer
in place of the random methods, setting each to tau_init and 0, respectively. - 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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.