zoukankan      html  css  js  c++  java
  • CS231n笔记 Lecture 8, Deep Learning Software

    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.

  • 相关阅读:
    使用mt_rand代替rand
    array_diff 不注意的坑
    stackoverflow 技术问答社区
    js检查浏览器是否处于隐身模式
    api数据接口
    图像识别api
    ionic creator(ionic生成器)
    商城金币设计
    details和summary标签
    iOS多线程编程之NSOperation的基本操作
  • 原文地址:https://www.cnblogs.com/ichn/p/8497222.html
Copyright © 2011-2022 走看看