Deep Learning HDL Toolbox - Error using dnnfpga.compiler.codegenfpga Index exceeds the number of array elements. Index must not exceed 0.
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello,
I have a Nerual Network imported from keras (TF 2.6). The model imported is working and I would like to configure an Intel Arria 10 FPGA using the Deep Learning HDL Toolbox. However, I get the following error while model is compiling with hW.compile:
### Compiling network for Deep Learning FPGA prototyping ...
### Targeting FPGA bitstream arria10soc_single.
### Optimizing network: Flatten layer ('flatten_1'), removed and fused into FC layer ('dense_1'). Weights of FC layer were modified to account for the flatten layer removal.
### Optimizing network: Fused 'nnet.keras.layer.ZeroPadding2dLayer' into 'nnet.cnn.layer.Convolution2DLayer'
### Notice: The layer 'conv2d_transpose' of type 'nnet.cnn.layer.TransposedConvolution2DLayer' is split into 'conv2d_transpose_insertZeros' and 'conv2d_transpose'.
### Notice: The layer 'conv2d_transpose_1' of type 'nnet.cnn.layer.TransposedConvolution2DLayer' is split into 'conv2d_transpose_1_insertZeros' and 'conv2d_transpose_1'.
### Notice: The layer 'conv2d_transpose_2' of type 'nnet.cnn.layer.TransposedConvolution2DLayer' is split into 'conv2d_transpose_2_insertZeros' and 'conv2d_transpose_2'.
### The network includes the following layers:
1 'input_1' Image Input 1×1×4 images (SW Layer)
2 'dense' Fully Connected 30 fully connected layer (HW Layer)
3 'batch_normalization' Batch Normalization Batch normalization with 30 channels (HW Layer)
4 'Sigmoid1' Sigmoid sigmoid (SW Layer)
5 'multiply' nnet.internal.cnn.coder.MultiplicationLayer nnet.internal.cnn.coder.MultiplicationLayer (HW Layer)
6 'conv2d_transpose' 2-D Transposed Convolution 1600 4×4×30 transposed convolutions with stride [1 1] and cropping [0 0 0 0] (HW Layer)
7 'batch_normalization_1' Batch Normalization Batch normalization with 1600 channels (HW Layer)
8 'Sigmoid2' Sigmoid sigmoid (SW Layer)
9 'multiply_1' nnet.internal.cnn.coder.MultiplicationLayer nnet.internal.cnn.coder.MultiplicationLayer (HW Layer)
10 'conv2d_transpose_1' 2-D Transposed Convolution 800 4×4×1600 transposed convolutions with stride [1 1] and cropping [0 0 0 0] (HW Layer)
11 'batch_normalization_2' Batch Normalization Batch normalization with 800 channels (HW Layer)
12 'Sigmoid3' Sigmoid sigmoid (SW Layer)
13 'multiply_2' nnet.internal.cnn.coder.MultiplicationLayer nnet.internal.cnn.coder.MultiplicationLayer (HW Layer)
14 'conv2d_transpose_2' 2-D Transposed Convolution 400 4×4×800 transposed convolutions with stride [1 1] and cropping [0 0 0 0] (HW Layer)
15 'batch_normalization_3' Batch Normalization Batch normalization with 400 channels (HW Layer)
16 'Sigmoid4' Sigmoid sigmoid (SW Layer)
17 'multiply_3' nnet.internal.cnn.coder.MultiplicationLayer nnet.internal.cnn.coder.MultiplicationLayer (HW Layer)
18 'conv2d' 2-D Convolution 200 3×3×400 convolutions with stride [1 1] and padding [1 1 1 1] (HW Layer)
19 'Sigmoid5' Sigmoid sigmoid (SW Layer)
20 'multiply_4' nnet.internal.cnn.coder.MultiplicationLayer nnet.internal.cnn.coder.MultiplicationLayer (HW Layer)
21 'conv2d_1' 2-D Convolution 1 3×3×200 convolutions with stride [1 1] and padding [1 1 1 1] (HW Layer)
22 'dense_1' Fully Connected 100 fully connected layer (HW Layer)
23 'Sigmoid' Sigmoid sigmoid (SW Layer)
24 'output' Classification Output crossentropyex with '1' and 99 other classes (SW Layer)
### Notice: The layer 'input_1' with type 'nnet.cnn.layer.ImageInputLayer' is implemented in software.
### Notice: The layer 'Sigmoid1' with type 'nnet.cnn.layer.SigmoidLayer' is implemented in software.
### Notice: The layer 'Sigmoid2' with type 'nnet.cnn.layer.SigmoidLayer' is implemented in software.
### Notice: The layer 'Sigmoid3' with type 'nnet.cnn.layer.SigmoidLayer' is implemented in software.
### Notice: The layer 'Sigmoid4' with type 'nnet.cnn.layer.SigmoidLayer' is implemented in software.
### Notice: The layer 'Sigmoid5' with type 'nnet.cnn.layer.SigmoidLayer' is implemented in software.
### Notice: The layer 'Sigmoid' with type 'nnet.cnn.layer.SigmoidLayer' is implemented in software.
### Notice: The layer 'output' with type 'nnet.cnn.layer.ClassificationOutputLayer' is implemented in software.
### Compiling layer group: dense ...
### Compiling layer group: dense ... complete.
### Compiling layer group: batch_normalization ...
### Optimizing network: Replaced Batch Normalization layer batch_normalization with an equivalent Convolution layer.
### Compiling layer group: batch_normalization ... complete.
### Compiling layer group: conv2d_transpose_insertZeros ...
### Compiling layer group: conv2d_transpose_insertZeros ... complete.
### Compiling layer group: conv2d_transpose>>batch_normalization_1 ...
### Optimizing network: Fused 'nnet.cnn.layer.BatchNormalizationLayer' into 'nnet.cnn.layer.Convolution2DLayer'
### Compiling layer group: conv2d_transpose>>batch_normalization_1 ... complete.
### Compiling layer group: conv2d_transpose_1_insertZeros ...
### Compiling layer group: conv2d_transpose_1_insertZeros ... complete.
### Compiling layer group: conv2d_transpose_1>>batch_normalization_2 ...
### Optimizing network: Fused 'nnet.cnn.layer.BatchNormalizationLayer' into 'nnet.cnn.layer.Convolution2DLayer'
### Compiling layer group: conv2d_transpose_1>>batch_normalization_2 ... complete.
### Compiling layer group: conv2d_transpose_2_insertZeros ...
### Compiling layer group: conv2d_transpose_2_insertZeros ... complete.
### Compiling layer group: conv2d_transpose_2>>batch_normalization_3 ...
### Optimizing network: Fused 'nnet.cnn.layer.BatchNormalizationLayer' into 'nnet.cnn.layer.Convolution2DLayer'
### Compiling layer group: conv2d_transpose_2>>batch_normalization_3 ... complete.
### Compiling layer group: conv2d ...
### Compiling layer group: conv2d ... complete.
### Compiling layer group: conv2d_1 ...
### Compiling layer group: conv2d_1 ... complete.
### Compiling layer group: dense_1 ...
### Compiling layer group: dense_1 ... complete.
Error using dnnfpga.compiler.codegenfpga
Index exceeds the number of array elements. Index must not exceed 0.
Error in dnnfpga.apis.Workflow/compileNetwork
Error in dnnfpga.apis.Workflow/compile
Error in generate_HDL_from_NN (line 18)
hW.compile;
Could anyone help me to find the rootcause?
You can find the model imported here nn.mat
---------------------------
Software version:
Deep Learning HDL Toolbox Support Package For Intel FPGA And SoC Devices 23.1.1
Matlab R2023a Update 2 (9.14.0.2254940)
Ubuntu 20.04
---------------------------
댓글 수: 0
답변 (1개)
Kiran Kintali
2023년 6월 22일
This is not an expected error message. Please reach out to tech support for help and any available workaround.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Time Series and Sequence Data Networks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!