Git Product home page Git Product logo

Comments (4)

aymericdamien avatar aymericdamien commented on April 28, 2024

What you are looking for is RNNs with dynamic calculation, you need to change rnn function and set a 'sequence_length' argument that will represents a list of each sequence length in your batch.
For more info: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/ops/rnn.py#57

from tensorflow-examples.

987410 avatar 987410 commented on April 28, 2024

Hi,

I used the code with _seq_len. Actually in training, n_steps (n_steps is global variable) is set constantly as 16, so as in your code there will be a vector _seq_len, and split with n_steps:

_seq_len = tf.fill(_batch_size, constant(_seq_len, dtype=tf.int32)) _seq_len = tf.cast(_seq_len, dtype=tf.int64) #seq_len needs type int64.. ... ... _X = tf.split(0,n_steps, _X) # n_steps * (batch_size, n_hidden)

but when testing, how can i change this n_steps value into 55 in tf.split? does it make sense?

from tensorflow-examples.

987410 avatar 987410 commented on April 28, 2024

my problem maybe less complicated, because when training n_steps is constant, What I want to do is just change n_steps values when test

from tensorflow-examples.

lmolhw5252 avatar lmolhw5252 commented on April 28, 2024

hello, Did your problem solved?

from tensorflow-examples.

Related Issues (20)

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.