Skip to content

Instantly share code, notes, and snippets.

@rdipietro
rdipietro / gist:8e220e77a2bb86b6b7955ac3d2b55d98
Created February 1, 2017 09:26
Clockwork RNNs in TensorFlow
class ClockworkLayer(RNNLayer):
""" A clockwork RNN layer.
As done in the original paper, we restrict ourselves to an exponential
series of periods. As noted in the paper, this lets W_H and W_I be
contiguous, and the implementation is therefore much simpler.
This is based on Jan Koutnik et al.: A Clockwork RNN.
arXiv preprint arXiv:1402.3511. 2014.