首页 > 其他 > 详细

CS231n笔记 Lecture 8, Deep Learning Software

时间:2018-03-03 19:11:16      阅读:213      评论:0      收藏:0      [点我收藏+]

CPU and GPU

技术分享图片

If you aren’t careful, training can bottleneck on reading data and transferring to GPU! Solutions:

  • - Read all data into RAM
  • - Use SSD instead of HDD
  • - Use multiple CPU threads to prefetch data

The point of deep learning frameworks

  • Easily build big computational graphs
  • Easily compute gradients in computational graphs
  • Run it all efficiently on GPU (wrap cuDNN, cuBLAS, etc)

 

DL frameworks

Pytorch大法好

TensorFlow

First define the graph, and then run it many times.

TOO UGLY!!! Introduces a lot of terms that doesn‘t seem to be important if it is designed right. And the api is not pythonic at all!

技术分享图片

use tensorboard to make life easier!

 

PyTorch

Pytorch大法好 

Tensor: ndarray that can do computations on GPU

Variable: node in a computational graph that supports Autograd. 

  • x.data. Tensor
  • x.grad. Variable of gradients with the same size of x.data
  • x.grad.data. the Tensor of gradients

nice and clean!

torch.nn package

  • already defined layers
  • build model on layers

torch.optim

update automatically with various optimization algorithms.

torchvision

pretrained models

Visdom

visualization.

 

技术分享图片

 

CS231n笔记 Lecture 8, Deep Learning Software

原文:https://www.cnblogs.com/ichn/p/8497222.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!