码迷,mamicode.com
首页 > 其他好文 > 详细

CS231n笔记 Lecture 8, Deep Learning Software

时间:2018-03-03 19:24:29      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:ini   ram   clean   img   cpu   tle   err   framework   orb   

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

标签:ini   ram   clean   img   cpu   tle   err   framework   orb   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!