I am training RNNs, which I built using tf.keras.layers.GRU layers. They are taking a long time to train (>2 hours), so I am going to deploy them to the GPU for training. I am wondering a few things about training on GPU:
- What is the difference between
tf.keras.layers.CuDNNGRU
andtf.keras.layers.GRU
(and alsotf.keras.layers.LSTM
vs.tf.keras.layers.CuDNNLSTM
)? I understand from this post thatCuDNNGRU
layers train faster thanGRU
layers, but- Do the 2 layers converge to different results with the same seed?
- Do the 2 layers perform the same during inference?
- Do CuDNN layers require a GPU during inference?
- Can GRU layers run inference on a GPU?
- Are CuDNN layers easily deployable? I am currently using
coremlconverter
to convert my keras model to CoreML for deployment.
- Is there an equivalent CuDNN layer for
tf.keras.layers.SimpleRNN
(i.e.tf.keras.layers.CuDNNSimpleRNN
)? I am not committed to a specific architecture yet, and so I believe I would need thetf.keras.layers.CuDNNSimpleRNN
layer if I decide on SimpleRNNs and the CuDNN layer has some functionality that I need. - With
CuDNN
layers, do I need to havetensorflow-gpu
installed? Or do they still get deployed to the GPU as long as I have the relevant drivers installed?