What is the difference between CuDNNLSTM and LSTM in Keras?

前端 未结 3 1300
失恋的感觉
失恋的感觉 2021-01-30 12:57

In Keras, the high-level deep learning library, there are multiple types of recurrent layers; these include LSTM (Long short term memory) and CuD

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-30 13:39

    GPUs are good for massive parallel computation, most of the linear algebra ops can be parallelized to improve performance, Vector operations like matrix multiplication and gradient descent can be applied to large matrices that are executed in parallel with GPU support. CUDA - Compute Unified Device Architecture provides an interface that allows vector ops to take advantage of GPU parallelism. CuDNN implements kernels for large matrix operations on GPU using CUDA.

    Here, CuDNNLSTM is designed for CUDA parallel processing and cannot run if there is no GPU. But LSTM is designed for normal CPUs. Faster time of execution is because of parallelism.

提交回复
热议问题