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.CuDNNGRUandtf.keras.layers.GRU(and alsotf.keras.layers.LSTMvs.tf.keras.layers.CuDNNLSTM)? I understand from this post thatCuDNNGRUlayers train faster thanGRUlayers, 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
coremlconverterto 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.CuDNNSimpleRNNlayer if I decide on SimpleRNNs and the CuDNN layer has some functionality that I need. - With
CuDNNlayers, do I need to havetensorflow-gpuinstalled? Or do they still get deployed to the GPU as long as I have the relevant drivers installed?