development and experiment of deep learning with caffe and maf

34
Caffemafをいた ディープラーニング 開発・実験法 株式会社 Preferred Networks 野 健太 <[email protected]> 2014/10/30 PyData Tokyo MeetUp #1 @デンソーアイティーラボラトリ

Upload: kenta-oono

Post on 02-Jul-2015

33.732 views

Category:

Technology


3 download

DESCRIPTION

2014/10/30 PyData Tokyo Meetup #1

TRANSCRIPT

2. (@delta2323_) 2012.3 PFI2014.10 PFN http://delta2323.github.io maf(PFN@beam2d)(/NII@nozyh) Caffemaf2 3. Preferred NetworksPreferred InfrastructurePFI2006l Preferred NetworksPFN2014l IoTl l l 3 4. Caffe maf Caffemaf Caffemasterc18d22edev30651a24 5. Caffe 6. Caffegit clone [email protected]:BVLC/caffe.git Berkeley Yangqing Jia(Google) Berkeley Vision and Learning Center (BVLC) BSD 2 clause OSUbuntu 14.04, 12.04, Mac OS X 10.9, 10.8 Mac OS 10.9libc++ Windows* C++, CUDAPython, Matlab DecafPythonC++, CUDA6* fork https://github.com/niuzhiheng/caffe 7. ** URLhttp://demo.caffe.berkeleyvision.org7 8. OSS API issue/Pull Request CUDA CPU, GPU CuDNNNVIDIAGPUDNNCaffehttps://docs.google.com/presentation/d/1UeKXVgRvvxg9OUdh_UiC5G71UMscNPlvArsWER41PsU/edit#slide=id.g39888e8c1_0398 9. Caffe(1)Deep Q Network*PongSpace InvaderCaffeDeep Q-Network**PFI2014 **** Playing Atari with Deep Reinforcement Learning, Volodymyr Mnih, Koray Kavukcuoglu, DavidSilver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, Martin Riedmiller NIPS Deep LearningWorkshop, 2013** http://d.hatena.ne.jp/muupan/20141021/14138504619*** http://www.ustream.tv/recorded/53153399 10. Caffe(2)GoogLeNet, VGG ILSVRC2014() 20056.6%(GoogLeNet)7.3%(VGG)10 11. NetNeural Net(NN) BlobNodeNeuron LayerBlobNetBlobLayerx1xNh1hHk1kMy1yMt1tMForwardBackward11 12. Layer NodeLayerXWY=(WX)XWWXY12 13. minibatch jEpoch 1Epoch 2Epoch iEpoch NEpoch iminibatch 1 2minibatch 2minibatch jminibatch M 1 B Epoch (Iteration)1 NetN SolverNet minibatchNN13 14. Caffe3 build/tools/ prototxt C++build/include, build/lib Layer Python / Matlabpython/ (Classifier/Detector) 14 15. prototxt Train/TestNetData LayerSolver DeployNetInput Blob Protocol Buffers *GoogLeNetprototxt2000https://github.com/BVLC/caffe/pull/1367/files* src/caffe/proto/caffe.proto15 16. prototxt(1)Train/TestNetTrain/TestmnistiplosslabelNetLayerTop BlobBottom BlobBlobLayerdataipData LayerLoss Layer16 17. prototxt(2)DeployNetNetipDeployprobdataipLayerBlob4BlobprobLayer17 18. 19. Python Binding* C++/Cuda Boost.Python Python Numpy/Scipy/matpotlib Numpy.ndarray ipython Notebook** Python Binding* python/** examples/*.ipynbhttp://caffe.berkeleyvision.org/tuto1r9ial/interfaces.html 20. Python Bindingcaffe::Net(C++)NetLayerBlobcaffe::Pynet(C++)caffe.Net(Python)Utility(C++)DerivesDerivescaffe::Classifier(Python)hasBoost.Pythoncaffe::Detector(Python)hascaffe::Layer(C++)caffe::PyLayer(C++)caffe.Layer(Python)caffe::Blob(C++)caffe::PyBlob(C++)caffe.Blob(Python)20 21. maf 22. = NN /Layer/Node// /Iteration/ ReLUInf * ** **** A Practical Guide to Training Restricted Boltzmann Machines, Geoffrey Hinton,https://www.cs.toronto.edu/~hinton/absps/guideTR.pdf** Practical Recommendations for Gradient-Based Training 22of Deep Architectures, Yoshua Bengio, arXiv:1206.5533v2*** Random Search for Hyper-Parameter Optimization, James Bergstra and Yoshua Bengio, JMLR 13 (2012) 281-305 23. 23 24. 24 25. mafgit clone [email protected]:pfi/maf.git Preferred Infrastructure / Preferred Networks 201312 ver. 0.2 Python waf (Python) // ()/25 26. mafliblinear26 27. maf27 28. maf Cifar10Net mafprototxt maf CaffeClassifier28 29. Caffe201410 Caffe maf Caffemaf29 30. 2014/11/630 31. Q. A. Sparse BlobInput BlobSparse BlobPullRequest*Torch7LayerSparse Linear LayerTorch7 (master=704684)** **** Sparse Data Support #937(https://github.com/BVLC/caffe/pull/937)** https://github.com/torch/nn/blob/master/SparseLinear.lua*** https://github.com/torch/nn/blob/master/doc/simple.md#nn.SparseLinear31 32. mafCaffeQ. mafCaffe1-j1A. Data LayerleveldbData LayerCaffe1leveldb issue*prototxt1issueleveldbLMDB* Parallel access to Leveldb #695(https://github.com/BVLC/caffe/issues/695)32 33. Mac OS 10.9Caffe (1/2)Q. Mac OS 10.9CaffeA. GPU10.8Mac OS 10.910.8C++Mac OS 10.9C++Clang++libc++NVIDIACUDAlibstdc++33 34. Mac OS 10.9Caffe (2/2)21. Clang++libc++libstdc++()2. (GPU) 10.8make allMakefile.config2( (1)--libstdc++(2)CPU_ONLY:=1) NVIDIAlibc++Caffe GPU@mooopan34