wolfe-pack / wolfe

Wolfe Language and Engine
https://wolfe-pack.github.io/wolfe
Apache License 2.0
135 stars 17 forks source link

FoldLeft Term #133

Open riedelcastro opened 9 years ago

riedelcastro commented 9 years ago

For LSTMs and other RNNs (and possibly more generally) it's necessary to recursively construct terms. This can be done already, but wouldn't be efficient. It would be great to have a term like

class FoldLeft[E<:Dom](elements:Term[VarSeqDom[E]], op: (Term[E],Term[A]) => Term[A] )
  extends Term[A]