Deep Learning(DL) and Machine Learning(ML) applications are rapidly increasing in recent days. Massive amounts of data are being generated over the internet which can derive meaningful results by the use of ML and DL algorithms. Hardware resources and open-source libraries have made it easy to implement these algorithms. Tensorflow and Pytorch are one of the leading frameworks for implementing ML projects. By using those frameworks, we can trace the operations executed on both GPU and CPU to analyze the resource allocations and consumption. This paper presents the time and memory allocation of CPU and GPU while training deep neural networks using Pytorch. This paper analysis shows that GPU has a lower running time as compared to CPU for deep neural networks. For a simpler network, there are not many significant improvements in GPU over the CPU.
翻译:近年来,深度学习与机器学习应用快速增长。互联网上产生的大量数据可通过机器学习与深度学习算法挖掘出有意义的结果。硬件资源与开源库使得这些算法的实现变得便捷。TensorFlow和PyTorch是实施机器学习项目的主流框架之一。借助这些框架,我们可以追踪在GPU和CPU上执行的操作,以分析资源分配与消耗情况。本文阐述了使用PyTorch训练深度神经网络时CPU与GPU的时间及内存分配情况。分析结果表明,对于深度神经网络,GPU相比CPU具有更低的运行时间。但对于较为简单的网络,GPU相较于CPU的改进并不显著。