Deep Learning

IoT Edge Deep Learning Neural Network Accelerators

2021-11-25. Category & Tags: Deep Learning, IoT, Edge, TPU, NCS, NCS2

Coral Edge Accelerator #

  • ML accelerator: Edge TPU ASIC (application-specific integrated circuit) designed by Google. Provides high-performance ML inferencing for TensorFlow Lite Models.
  • USB 3.1 (gen 1) port and cable (SuperSpeed, 5Gb/s transfer speed)
  • Dimensions: 30 x 65 x 8mm
  • Price: USD74.99 in 2019, USD $ 60 in 2021, ¥ 740 @JD.com
  • 0.5 watts/TOPS
  • MAX 4 TOPS (int8), 2W.
  • TF Lite + Debian only.
  • Not available world wide

Intel NCS2 Neural Compute Stick 2 #

  • Processor: Intel Movidius Myriad X Vision Processing Unit (VPU)
  • USB 3.0 Type-A
  • Dimensions: 72.5 x 27 x 14mm
  • Price: USD $ 87.99 (2019), USD $ 72 (2021), ¥ 570 @JD.com
  • MAX 4 TOPS, 7 W.
  • Any model (TF, PyTorch, Caffe …)

ref

...

AI Cloud

2019-11-01. Category & Tags: Cloud Platform, Machine Learning, ML, Deep Learning, DL

“if you plan to use deep learning extensively (>150 hrs/mo), building your own deep learning workstation might be the right move.” [medium]

  • Baidu AI Studio (only for PaddlePaddle)
  • Paperspace (cooperating with fast.ai)
  • Google Colab (cooperating with fast.ai)
  • vast.ai (C2C/P2P sharing, very cheap, a lot of time to init/load/unload)
  • Kaggle (max 6h, good GPU but complex steps to use)
  • MS Azure
  • Amazon
  • FloydHub (special CLI interface)

ref:

PyTorch

2019-09-03. Category & Tags: Deep Learning, PyTorch

Install (w/ GPU) #

win10 #

Install NV GPU driver and compatible CUDA version first, or install using pip together.
See PyTorch doc’s selector to find a compatible CUDA version.
pytorch-with-cuda
Then use the cmd given by the selector to install PyTorch:

pip source: #

pip install pytorch torchvision torchaudio cudatoolkit=11.1

pip binary: #

pip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

Tip: the torch...whl file is > 3GB, which can be pre-downloaded via IDM etc., then:

...

Deep Learning - Just do it!

2019-07-22. Category & Tags: Deep Learning, DL, Practise

see also: /dl-theory

Data #

Tutorials #

News & Tech #

Ready to Use Software #

GPU #

Which GPU(s) to Get for Deep Learning: My Experience and Advice for Using GPUs in Deep Learning 2020-09-07 (cn)

...

Caffe Installation, Hello World

2017-12-03. Category & Tags: Caffe, Deep Learning, Mnist

Note: tested with Ubuntu 16.04.1 using /root, for newer Ubuntu version (>= 17.04), check here.

Installation & Self-Tests #

Use the installation script here.
//(Sunny only added conditional USE_CUDNN=1, the rest is the same as: ref. You may wanna set USE_CUDNN to 0, if no GPU is used).
Timing: 15min if everything goes well, while downloading speed 1~8MB/s.

Hello World (Mnist) #

prepare data: #

./data/mnist/get_mnist.sh        # will download into ./data/mnist/
./examples/mnist/create_mnist.sh # will create lmdb, compute image mean

train #

# < 1min on TitanX
./build/tools/caffe train -solver examples/mnist/lenet_solver.prototxt -gpu 0

updatedb && \
locate lenet_iter

//by default, -gpu device index is -1 (no gpu)
//The training can start from any training snapshot:
caffe train -solver=lenet_solver.prototxt -snapshot=lenet_iter_350.solverstate (see the end of this article)

...

TensorFlow Engineering with CUDA GPU for Deep Learning

2017-03-13. Category & Tags: Deep Learning, TensorFlow, GPU, CUDA, TF

See also:

Install #

Summary: install CUDA first, then TF.
ref TF 1.0 doc
ref nvidia doc, until step 3

requirements #

  • 64-bit Linux
  • Python 2.7 or 3.3+ (3.5 used in this blog)
  • NVIDIA CUDA 7.5 (8.0 if Pascal GPU)
  • NVIDIA cuDNN >v4.0 (v5.1 recommended)
  • NVIDIA GPU with compute capability >3.0

steps #

1.Manually download “cuDNN v6.0 Library for Linux”.
2.Bash auto Install CUDA in Ubuntu 16.04.2, can combine (&& \) with code below.
3.Install cuDNN, PIP:

...

Theory, Papers of Deep Learning DL

2017-03-10. Category & Tags: Deep Learning, DL, Theory

see also: /dl-do-it

MIXED TUTORIAL + TRIKCS #

PAPERS, TERMS & DEFINATIONS #

ToC:
一 ~ 三、概述, 背景, 人脑视觉机理
四、关于特征: 特征表示的粒度; 初级(浅层)特征表示; 结构性特征表示; 需要有多少个特征?
五 ~ 七、Deep Learning 的基本思想 (vs. Shallow Learning), Neural Network
八、Deep learning 训练过程: 传统神经网络 vs. deep learning
九、Deep Learning 的常用模型或者方法: AutoEncoder 自动编码器; Sparse Coding 稀疏编码; Restricted Boltzmann Machine(RBM) 受限波尔兹曼机; Deep BeliefNetworks 深信度网络; Convolutional Neural Networks 卷积神经网络
十、总结与展望
十一、参考文献和 Deep Learning 学习资源

...