필터 지우기
필터 지우기

Error using dnnfpga.co​mpiler.cod​egenfpga. Layer 'block2b_add' has multiple inputs.

조회 수: 3 (최근 30일)
Hello,
I have a pretrained NN imported from TensorFlow. I have imported and replaced the only one placeholder layer and the DAGNetwork seems to be ok. However, when I try to compile the NN with Deep Learning HDL Toolbox, I get the following error:
Error using dnnfpga.compiler.codegenfpga
Layer 'block2b_add' has multiple inputs. Specify which input of layer 'block2b_add' to use.
Error in dnnfpga.apis.Workflow/compileNetwork
Error in dnnfpga.apis.Workflow/compile
Error in generate_HDL_from_NN (line 18)
hW.compile;
block2b_add has two inputs and connections are defined.
Please find the NN in the LINK.
Could anyone help me to understand the issue?
Thank you in advance
---------------------------
Software version:
Deep Learning HDL Toolbox Support Package For Intel FPGA And SoC Devices 21.2.4
Matlab R2021b Update 6 (9.11.0.2207237)
Ubuntu 20.04
---------------------------
  댓글 수: 3
Rubén
Rubén 2023년 5월 4일
편집: Rubén 2023년 5월 5일
I'm sorry, but that message is not prompted while importing savedModel or NN.mat (at least with my Matlab version).
I have replaced EfficienB0_p1_C1.kRescalingLayer246310 by a scalingLayer - which has the same behaviour. However, I get the same error message while compiling.
Please, find in the following link the new NN: NN_RescalingLayer_replaced.mat
Aravind Devarakonda
Aravind Devarakonda 2023년 5월 12일
Hi Ruben
Thank you for replacing the network originally attached.
Regarding your inquiry, I have observed that the network given has a few layers that are not yet supported in the Deep Learning HDL Toolbox and are planned to be integrated in future updates.
These layers include :
1) Scaling Layer
2) Layer Normalization Layer
3) Swish Layer and,
4) FlattenCStyleLayer immediately followed by Convolution2DLayer is also not supported.
Currently, a flatten layer must be followed by either fully connected layer(s) or a join layer (eg. depth concatenation, addition) followed by fully connected layer(s).
As a workaround, I would suggest implementing the Scaling Layer as a custom layer by following the steps available on this documentation link -
https://in.mathworks.com/help/deep-learning-hdl/ug/create-deep-learning-processor-configuration-for-custom-layers.html
Regarding FlattenCStyleLayer immediately followed by Convolution2DLayer, I suggest replacing it with a fully connected layer.

댓글을 달려면 로그인하십시오.

답변 (1개)

Rubén
Rubén 2023년 5월 3일
Hello,
I tried to merge zero padding layer into group convolution layer because issue https://www.mathworks.com/support/bugreports/2661508 according to this comment https://es.mathworks.com/matlabcentral/answers/1947228-error-compiling-resnet50-deep-learning-hdl-toolbox-support-package#comment_2730974 but I get the same error.
Could you confirm this is the sme or a different issue?

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by