Skip to content

Instantly share code, notes, and snippets.

@joemarshall
joemarshall / CUDNNCompatibleGRU.py
Last active May 12, 2019 14:43
Bug in keras CUDNN weight ordering
# I just put this in so you can see why it matters
class CUDNNCompatible_GRUCell(keras.layers.Layer):
"""Cell class for the GRU layer which is compatible with CuDNN GRU cells (but doesn't require tensorflow/Cuda).
# Arguments
units: Positive integer, dimensionality of the output space.
activation: Activation function to use
(see [activations](../activations.md)).
If you pass None, no activation is applied
(ie. "linear" activation: `a(x) = x`).