1,918 karma · joined May 13, 2015
The Tensorflow documentation has an okay writeup about seq2seq models: https://www.tensorflow.org/tutorials/seq2seq
The author of the library also has a small blurb about it on his blog: http://www.wildml.com/deep-learning-glossary/#seq2seq
https://github.com/tensorflow/tensorflow/tree/master/tensorf...
The rest of the deck, however, creeps me the fuck out.
[1] https://github.com/scala-native/scala-native-example/blob/ma...
Each section contains a story of some situation he was in where he faced a problem which he solved by applying one of various algo techniques (DP, divide and conquer, etc.). After reading CLRS for a class, it was nice to see how some of the most common textbook algorithms have been applied by a notable computer scientist.
The Haskell `newtype` example I gave was meant to illustrate this, as newtype's are respected by the type system and then are treated as the underlying type at runtime.
http://cs-www.cs.yale.edu/homes/aspnes/classes/465/notes.pdf
Having said that it would've been a very simple extension to make it a recursive algorithm which includes the else case, and arguably would be clearer than the for loop solution.
f = sum $ map (\x -> if x == 'a' then 2 else 0)
I tend to think that as the accumulation condition gets more complicated, the for loop begins to be the clearer choice, but of course there's always a way to simplify into a number of map steps. This can lead to a bunch of allocation overhead for the intermediate lists unless iterators are used in languages where those are supported.EDIT: Whoops, read and replied on mobile, missed the parseLine() call :/
EDIT EDIT: Looks like my code matched the parent as of when I read it, before the edit. wyager is correct that I messed up my point-free syntax
Smirks, puts on tinfoil hat
"Doesn't look like anything to me?"