Giter Club home page Giter Club logo

convlstmcell-tensorflow's People

Contributors

iwyoo 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

Watchers

 avatar  avatar

convlstmcell-tensorflow's Issues

inputs of the ConvLSTMCell

I have some confusions about the code:

_conv(args, output_size, ....) which say shape of inputs is (batch_size x height x width x arg_size) , what's the meaning of "arg_size"?

How to define the input of COnvLSTMCell ? I know how to define a network of LSTM:

      X = tf.placeholder([batch_size,time_steps,dim_input])             
      # [batchsize, time_steps, diminput] => [nsteps, batchsize, dim_input]
      X = tf.transpose(X, [1, 0, 2])
      # 2. Reshape input to [nsteps*batchsize, dim_input]
      X = tf.reshape( X, [-1, dim_input])
      # 3. Input layer => Hidden layer
      input_split = tf.matmul(X, _W['hidden']) + _b['hidden']
      # 4. Splite data to 'nsteps' chunks. An i-th chunck indicates i-th batch data
      input_split = tf.split(0,time_steps, input_split)
      lstm_cell = tf.nn.rnn_cell.BasicLSTMCell(num_hidden, \
                                         forget_bias=1.0,state_is_tuple=True)
      lstm_cell = tf.nn.rnn_cell.MultiRNNCell([lstm_cell]*num_layers,\
                                         state_is_tuple=True)
      state     = lstm_cell.zero_state(batch_size,dtype=tf.float32)
      LSTM_O, LSTM_S = tf.nn.rnn(lstm_cell, input_split, \
                                         initial_state=state)

In the above code ,how to chang the X and input_split to feed to ConvLSTMCell ? (A simple demo which show us how to use would more grateful ! )

Input 'split_dim' of 'Split' Op has type float32 that does not match expected type of int32.

Hi,
I got the following error:
Input 'split_dim' of 'Split' Op has type float32 that does not match expected type of int32.
Here is my code: I wish to use convlstm to regress a 14 channel input to a 13 channel output and learn the temporal and spatial information.
x = tf.placeholder(tf.float32, [None, 46, 46, FLAGS.seq_length, 14]) #input is [batch_size, 46,46,10,14], step size is 10, and it is a 14 channel input.
y = tf.placeholder(tf.float32, [None, 46, 46, FLAGS.seq_length, 13])# ground truth data
lr = tf.placeholder("float")
_Hsplit = tf.split(x, FLAGS.seq_length, 3)
_Hsplit = [tf.squeeze(x, [3]) for x in _Hsplit]

cell = ConvLSTMCell(13)
state = cell.zero_state(16, 46, 46) #batchsize is 16, height and width is 46.
x_unwrap = []
with tf.variable_scope("ConvLSTM") as scope:  # as BasicLSTMCell
    for i, p_input_ in enumerate(_Hsplit):
        if i > 0:
            scope.reuse_variables()
        # ConvCell takes Tensor with size [batch_size, height, width, channel].
        t_output, state = cell(p_input_, state)
        x_unwrap.append(t_output)

x_unwrap = tf.stack(x_unwrap)
x_unwrap = tf.transpose(x_unwrap, [1, 0, 2, 3, 4])
hidden_unwrap = tf.stack(hidden_unwrap)
hidden_unwrap = tf.transpose(hidden_unwrap, [1, 0, 2, 3, 4])

Thanks for your answer in advance !

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.