This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |