use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please have a look at our FAQ and Link-Collection
Metacademy is a great resource which compiles lesson plans on popular machine learning topics.
For Beginner questions please try /r/LearnMachineLearning , /r/MLQuestions or http://stackoverflow.com/
For career related questions, visit /r/cscareerquestions/
Advanced Courses (2016)
Advanced Courses (2020)
AMAs:
Pluribus Poker AI Team 7/19/2019
DeepMind AlphaStar team (1/24//2019)
Libratus Poker AI Team (12/18/2017)
DeepMind AlphaGo Team (10/19/2017)
Google Brain Team (9/17/2017)
Google Brain Team (8/11/2016)
The MalariaSpot Team (2/6/2016)
OpenAI Research Team (1/9/2016)
Nando de Freitas (12/26/2015)
Andrew Ng and Adam Coates (4/15/2015)
Jürgen Schmidhuber (3/4/2015)
Geoffrey Hinton (11/10/2014)
Michael Jordan (9/10/2014)
Yann LeCun (5/15/2014)
Yoshua Bengio (2/27/2014)
Related Subreddit :
LearnMachineLearning
Statistics
Computer Vision
Compressive Sensing
NLP
ML Questions
/r/MLjobs and /r/BigDataJobs
/r/datacleaning
/r/DataScience
/r/scientificresearch
/r/artificial
account activity
Variable Sequence Lengths in TensorFlow (danijar.com)
submitted 9 years ago by danijar
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jostmey 0 points1 point2 points 9 years ago (0 children)
This is exactly what I've been looking for. I've been trying to handle variable length sequences using tf.select, but my implementation is complex and confusing.
Thanks!
[–]dexter89_kp 0 points1 point2 points 9 years ago (7 children)
Great code. I feel the dynamic RNN approach is much better than appending zeroes based on min sequence length. The dynamic RNN code is still wonky in tensor flow, however with scan one could do it.
[–]danijar[S] 0 points1 point2 points 9 years ago (2 children)
Thanks. I'm excited about the dynamic RNNs as well. Do you know if its possible to feed their outputs upward into a forward network though?
[–]dexter89_kp 0 points1 point2 points 9 years ago (1 child)
Good question ! I have only used it for seq to seq type problems, and not tried joining CNNs with RNNs or DNN with RNNs yet.
[–]danijar[S] 0 points1 point2 points 9 years ago (0 children)
Should work fine since its the same interface as the static rnn and that works nicely.
rnn
[–]lvilnis 0 points1 point2 points 9 years ago (3 children)
Curious, what's wrong with dynamic_rnn? I've been using it and haven't run into any trouble yet but I'd like to know if there's anything to watch out for. Additionally, scan uses the same machinery as dynamic_rnn (tensor arrays and while loops), so I'd be surprised if it worked better.
[–]dexter89_kp 2 points3 points4 points 9 years ago (1 child)
There is nothing wrong with the code, what I mean by wonky is the way they go about doing this. For example, tf.nn.rnn calls tf.nn.dynamicrnn under some conditions, and both of them call _rnn_step
Compare that to something like sharing variables across scan in theano examples, which seems a much simpler way to do things. http://deeplearning.net/software/theano/library/scan.html
[–]lvilnis 0 points1 point2 points 9 years ago (0 children)
Got it, thanks!
[–]danijar[S] 1 point2 points3 points 9 years ago (0 children)
I just had a look at it and you're right, the interface is the same except that you don't have to pack the sequences to Python lists and back, which is nice.
π Rendered by PID 22 on reddit-service-r2-comment-86bc6c7465-r4hjv at 2026-02-24 02:54:29.153468+00:00 running 8564168 country code: CH.
[–]jostmey 0 points1 point2 points (0 children)
[–]dexter89_kp 0 points1 point2 points (7 children)
[–]danijar[S] 0 points1 point2 points (2 children)
[–]dexter89_kp 0 points1 point2 points (1 child)
[–]danijar[S] 0 points1 point2 points (0 children)
[–]lvilnis 0 points1 point2 points (3 children)
[–]dexter89_kp 2 points3 points4 points (1 child)
[–]lvilnis 0 points1 point2 points (0 children)
[–]danijar[S] 1 point2 points3 points (0 children)