量子化と枝刈り
量子化または枝刈りの実行による深層ニューラル ネットワークの圧縮
Deep Learning Toolbox™ を Deep Learning Toolbox Model Quantization Library サポート パッケージと共に使用し、以下を行うことで、深層ニューラル ネットワークのメモリ フットプリントの削減と計算要件の緩和を行います。
層の重み、バイアス、および活性化を、低い精度にスケーリングされた整数データ型に量子化します。その後、この量子化ネットワークから、C/C++ コード、CUDA® コード、または HDL コードを生成できます。
1 次テイラー近似を使用して畳み込み層からフィルターを枝刈りします。その後、この枝刈りされたネットワークから、C/C++ コードまたは CUDA コードを生成できます。
関数
アプリ
ディープ ネットワーク量子化器 | Quantize a deep neural network to 8-bit scaled integer data types |
トピック
深層学習の量子化
- 深層ニュートラル ネットワークの量子化
量子化の影響とネットワーク畳み込み層のダイナミック レンジの可視化方法を学習します。 - 量子化ワークフローの必要条件
深層学習ネットワークの量子化に必要な製品。 - Emulate Target Agnostic Quantized Network
With MATLAB you can quantize neural networks without generating code or deploying to a specific target.
GPU ターゲットの量子化
- Emulate Quantized Network Behavior for GPU Target
Examine the behavior of a quantized network deployed for GPU targets without generating code. - 量子化された深層学習ネットワークのコード生成 (GPU Coder)
事前学習済み畳み込みニューラル ネットワークを量子化してコードを生成します。 - Quantize Residual Network Trained for Image Classification and Generate CUDA Code
This example shows how to quantize the learnable parameters in the convolution layers of a deep learning neural network that has residual connections and has been trained for image classification with CIFAR-10 data. - Quantize Object Detectors and Generate CUDA Code
This example shows how to generate CUDA® code for an SSD vehicle detector and a YOLO v2 vehicle detector that performs inference computations in 8-bit integers.
FPGA ターゲットの量子化
- Quantize Network for FPGA Deployment (Deep Learning HDL Toolbox)
This example shows how to quantize learnable parameters in the convolution layers of a neural network, and validate the quantized network. Rapidly prototype the quantized network by using MATLAB simulation or an FPGA to validate the quantized network. In this example, you quantize the LogoNet neural network. - Classify Images on an FPGA Using a Quantized DAG Network (Deep Learning HDL Toolbox)
In this example, you use Deep Learning HDL Toolbox™ to deploy a quantized deep convolutional neural network and classify an image. The example uses the pretrained ResNet-18 convolutional neural network to demonstrate transfer learning, quantization, and deployment for the quantized network. Use MATLAB ® to retrieve the prediction results. - Classify Images on FPGA by Using Quantized GoogLeNet Network (Deep Learning HDL Toolbox)
This example show how to use the Deep Learning HDL Toolbox™ to deploy a quantized GoogleNet network to classify an image. The example uses the pretrained GoogLeNet network to demonstrate transfer learning, quantization, and deployment for the quantized network. Quantization helps reduce the memory requirement of a deep neural network by quantizing weights, biases and activations of network layers to 8-bit scaled integer data types. Use MATLAB® to retrieve the prediction results.
CPU ターゲットの量子化
- Code Generation for Quantized Deep Learning Networks (MATLAB Coder)
Quantize and generate code for a pretrained convolutional neural network. - Code Generation for Quantized Deep Learning Network on Raspberry Pi (MATLAB Coder)
Generate code for deep learning network that performs inference computations in 8-bit integers.
枝刈り
- Parameter Pruning and Quantization of Image Classification Network
Use parameter pruning and quantization to reduce network size. - Prune Image Classification Network Using Taylor Scores
This example shows how to reduce the size of a deep neural network using Taylor pruning. By using thetaylorPrunableNetwork
function to remove convolution layer filters, you can reduce the overall network size and increase the inference speed. - Prune Filters in a Detection Network Using Taylor Scores
This example shows how to reduce network size and increase inference speed by pruning convolutional filters in a you only look once (YOLO) v3 object detection network.