Skip to Content
深度学习入门 : 基于Python的理论与实现
book

深度学习入门 : 基于Python的理论与实现

by 斋藤康毅
July 2018
Intermediate to advanced
310 pages
8h 21m
Chinese
Posts & Telecom Press
Content preview from 深度学习入门 : 基于Python的理论与实现
8.3  深度学习的高速化 
249
8-14  AlexNet forward 处理中各层的时间比:左边是使用GPU 的情况,右边是使
CPU 的情况。图中的“conv”对应卷积层,“pool”对应池化层,“fc”对应全
连接层,“norm”对应正规化层(引用自文献[26]
8.3.2
 基于GPU的高速化
GPU
原本是作为图像专用的显卡使用的,但最近不仅用于图像处理,
也用于通用的数值计算。由于
GPU
可以高速地进行并行数值计算,因此
GPU 计算的目标就是将这种压倒性的计算能力用于各种用途。所谓
GPU
计算,
是指基于
GPU
进行通用的数值计算的操作。
深度学习中需要进行大量的乘积累加运算(或者大型矩阵的乘积运算)。
这种大量的并行运算正是
GPU
所擅长的(反过来说,
CPU
比较擅长连续的、
复杂的计算)。因此,与使用单个
CPU
相比,使用
GPU
进行深度学习的运算
可以达到惊人的高速化。下面我们就来看一下基于
GPU
可以实现多大程度的
高速化。图8
-
15 是基于
CPU
GPU
进行
AlexNet
的学习时分别所需的时间。
从图中可知,使用
CPU
要花40 天以上的时间,而使用
GPU
则可以将时
间缩短至6 天。此外,还可以看出,通过使用
cuDNN
这个最优化的库,可
以进一步实现高速化。
GPU
主要由
NVIDIA
AMD
两家公司提供。虽然两家的
GPU
都可以
用于通用的数值计算,但与深度学习比较“亲近”的是
NVIDIA
GPU
。实
际上,大多数深度学习框架只受益于
NVIDIA
GPU
。这是因为深度学习
的框架中使用了
NVIDIA ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

ルールズ・オブ・プログラミング ―より良いコードを書くための21のルール

ルールズ・オブ・プログラミング ―より良いコードを書くための21のルール

Chris Zimmerman, 久富木 隆一

Publisher Resources

ISBN: 9787115485588