torch - mx's blog
mx's blog
    • Misc
    • Music
    • Notes
    • Soft
    • Tech
  • Misc
  • Music
  • Notes
  • Soft
  • Tech
  • Archive
  1. 标签云
  2. torch

[learning torch] 6. optim (optimization tools)

Mon, 10 Oct 2016 Category notes torch Series Part 6 of «torch学习笔记»

ref: http://rnduja.github.io/2015/10/26/deep_learning_with_torch_step_7_optim/
doc: https://github.com/torch/optim/blob/master/doc/intro.md

Before we implement the gd update step by defining a gradientUpdate function and calling it in a loop.

function gradientUpdate(model, x, y, criterion, learningRate) 
    local pred = model:forward(x ...

[learning torch] 5. nngraph (another way to construct nn)

Sat, 08 Oct 2016 Category notes torch Series Part 5 of «torch学习笔记»

ref: http://rnduja.github.io/2015/10/07/deep_learning_with_torch_step_4_nngraph/
doc: https://github.com/torch/nngraph/

The aim of this library is to provide users of nn package with tools to easily create complicated architectures.

luarocks install nngraph

optionally can install graphvis for graph visualization.

From previous posts, to build networks ...

[learning torch] 4. Criterion (loss function)

Sat, 08 Oct 2016 Category notes torch Series Part 4 of «torch学习笔记»

ref: http://rnduja.github.io/2015/10/05/deep_learning_with_torch_step_3_nn_criterions/
doc: https://github.com/torch/nn/blob/master/doc/criterion.md

Criterion: abstract class, given input and target(true label), a Criterion can compute the gradient according to a certain loss function.

Criterion class

important methods:

  • forward(input, target): compute the ...

[learning torch] 3. Container (models)

Fri, 07 Oct 2016 Category notes torch Series Part 3 of «torch学习笔记»

doc: https://github.com/torch/nn/blob/master/doc/containers.md
ref: http://rnduja.github.io/2015/10/04/deep_learning_with_torch_step_2_nn_containers/

Container, similarly to Module, is the abstract class defining the base methods inherited from concrete containers. Container contains modules (layers).

Container class

important methods:

  • add(module)
  • get(index): get module ...

[learning torch] 2. Module (layers)

Fri, 07 Oct 2016 Category notes torch Series Part 2 of «torch学习笔记»

Module is an abstract class which defines fundamental methods necessary for a Layer.

doc: https://github.com/torch/nn/blob/master/doc/module.md

Module class

variables in Module:

  • output: Tensor, the ouput computed from last call of forward(input)
  • gradInput: Tensor, gradient wrt input of module, computed from last ...

[learning torch] 1. Tensor

Fri, 07 Oct 2016 Category notes torch Series Part 1 of «torch学习笔记»

A Tensor is the fondamental data type in torch, (similar to numpy for tensorflow), it's a potentially multi-dimensional matrix.

See doc: https://github.com/torch/torch7/blob/master/doc/tensor.md

basic ops

  • Indicate shape in constructor:

    th> x = torch.Tensor(3,4) [0.0000s] th> x 3.7366e ...

关于 mx

推荐文章

  • 学术文章写作利器: TeXmacs介绍
  • 运筹的力量: 用线性规划解决Google 2014 HashCode问题
  • 正则表达式入门简介
  • 我的ubuntu10.04配置总结
  • 2011巴黎高科(ParisTech)申请总结
  • 用尽量少的时间考一个够用的分数--一点Tofel/GRE备考经验
  • 用pelican在github上创建自己的博客!

  • X

    上海西南某高校

    Visitors

    web counter

    标签云

    • pelican 7
    • google 6
    • german 1
    • torch 6
    • 微信公众号 1
    • deep learning 28
    • 巴黎高科 1
    • markdown 2
    • linux 4
    • inf422 1
    • Toefl 1
    • regex 1
    • git 5
    • weka 1
    • scala 12
    • 写作 1
    • opencv 1
    • scrapy 1
    • GRE 1
    • LP 1
    • android 9
    • pandas 1
    • codejam 2
    • fr 2
    • shell 4
    • python 13
    • Simon&Garfunkel 1
    • french 2
    • 外观 4
    • 中文乱码 2
    • host 3
    • tips 3
    • ssh 2
    • ubuntu 1
    • 效率 1
    • java 4
    • spark 6
    • Flutter 5
    • tex 4
    • C++ 1
    • algorithm 35
    • TeXmacs 1
    • ml 4
    • eclipse 4
    • OCaml 8
    • R 4
    • mermaid 1
    • 出国 2
    • swiss 3
    • 快捷键 3

    GitHub仓库

    Status updating...

    @x-wei on GitHub

    links : farseerfc H.Y. reginald1787 dofine

    © 2016 mx · 通过 Pelican 生成 Creative Commons License