+ All Categories
Home > Documents > Gluon: new MXNet interface to accelerate research · TensorFlow Microsoft CNTK xnet . 4549 lines...

Gluon: new MXNet interface to accelerate research · TensorFlow Microsoft CNTK xnet . 4549 lines...

Date post: 29-May-2020
Category:
Upload: others
View: 16 times
Download: 0 times
Share this document with a friend
10
Gluon: new MXNet interface to accelerate research Mu Li AWS Deep Learning https://mli.github.io/cvpr17/
Transcript
Page 1: Gluon: new MXNet interface to accelerate research · TensorFlow Microsoft CNTK xnet . 4549 lines (4698 sloc) 63.9 KB le 11 2e 21 name : input : " ResNet-1ê1 " "data" 1 3 224 224

Gluon: new MXNet interface to accelerate research

Mu Li AWS Deep Learning

https://mli.github.io/cvpr17/

Page 2: Gluon: new MXNet interface to accelerate research · TensorFlow Microsoft CNTK xnet . 4549 lines (4698 sloc) 63.9 KB le 11 2e 21 name : input : " ResNet-1ê1 " "data" 1 3 224 224

2

2012before 2013 2014 2015 2016 2017

mxnetimperativesymbolic

Page 3: Gluon: new MXNet interface to accelerate research · TensorFlow Microsoft CNTK xnet . 4549 lines (4698 sloc) 63.9 KB le 11 2e 21 name : input : " ResNet-1ê1 " "data" 1 3 224 224

Caffe

3

ResNet-101-deploy.prototxt

✦ Protobuf as the interface ✦ Portable ❖ caffe binary + protobuf model

✦ Reading and writing protobuf are not straightforward

…. (4K lines of codes)

Page 4: Gluon: new MXNet interface to accelerate research · TensorFlow Microsoft CNTK xnet . 4549 lines (4698 sloc) 63.9 KB le 11 2e 21 name : input : " ResNet-1ê1 " "data" 1 3 224 224

Tensorflow

4

✦ A rich set of operators (~2000) ✦ The codes are not very easy to

read, e.g. not python-like

Implement Adam

> 300 lines of codes

Page 5: Gluon: new MXNet interface to accelerate research · TensorFlow Microsoft CNTK xnet . 4549 lines (4698 sloc) 63.9 KB le 11 2e 21 name : input : " ResNet-1ê1 " "data" 1 3 224 224

Keras

✦ Simple and easy to use ✦ Difficult to implement

sophisticated algorithms

5

Page 6: Gluon: new MXNet interface to accelerate research · TensorFlow Microsoft CNTK xnet . 4549 lines (4698 sloc) 63.9 KB le 11 2e 21 name : input : " ResNet-1ê1 " "data" 1 3 224 224

Pytorch & Chainer

✦ Flexible ✦ Complicate programs might

be slow to run

6

Page 7: Gluon: new MXNet interface to accelerate research · TensorFlow Microsoft CNTK xnet . 4549 lines (4698 sloc) 63.9 KB le 11 2e 21 name : input : " ResNet-1ê1 " "data" 1 3 224 224

MXNet

✦ Symbolic on network definition ✦ Imperative on tensor computation ✦ Huh.., not good enough

7

Implement Resnet

Implement Adam

Page 8: Gluon: new MXNet interface to accelerate research · TensorFlow Microsoft CNTK xnet . 4549 lines (4698 sloc) 63.9 KB le 11 2e 21 name : input : " ResNet-1ê1 " "data" 1 3 224 224

8

2012before 2013 2014 2015 2016 2017

mxnetimperative

symbolicgluon

Page 9: Gluon: new MXNet interface to accelerate research · TensorFlow Microsoft CNTK xnet . 4549 lines (4698 sloc) 63.9 KB le 11 2e 21 name : input : " ResNet-1ê1 " "data" 1 3 224 224

Gluon at a glance

9

net.hybridize() converts from

imperative to symbolic execution

Page 10: Gluon: new MXNet interface to accelerate research · TensorFlow Microsoft CNTK xnet . 4549 lines (4698 sloc) 63.9 KB le 11 2e 21 name : input : " ResNet-1ê1 " "data" 1 3 224 224

In summary✦ Symbolic ❖ efficient & portable ❖ but hard to use

10

✦ tesla

✦ Imperative ❖ flexible ❖ may be slow

✦ Gluon ❖ imperative for developing ❖ symbolic for deploying


Recommended