nnet.keras​.layer.Fla​ttenCStyle​Layer is not supported

조회 수: 1 (최근 30일)
Rubén
Rubén 2023년 4월 10일
편집: Rubén 2023년 4월 19일
Hello,
I've imported a NN in SaveModel fromat from TensorFlow (v2.6). It has a Keras flatten layer and when I try to generate the HDL with Deep Learning HDL Toolbox Support Package For Intel FPGA And SoC Devices I get the following message:
Error using dnnfpga.compiler.codegenfpga
Layer nnet.keras.layer.FlattenCStyleLayer is not supported. See the documentation for list of supported layers.
Error in dnnfpga.apis.Workflow/compileNetwork
Error in dnnfpga.apis.Workflow/compile
Error in generate_HDL_from_NN (line 19)
dn = hW.compile;
However, nnet.keras.layer.FlattenCStyleLayer is supported according to documentation (https://es.mathworks.com/help/deep-learning-hdl/ug/supported-networks-layers-boards-and-tools.html)
I realised that nnet.keras.layer.FlattenCStyleLayer must be followed by a Fully connected layer and it does.
These are the layers from the NN imported:
nn.Layers =
7×1 Layer array with layers:
1 'input_layer' Image Input 28×28×1 images
2 'flatten' Keras Flatten Flatten activations into 1-D assuming C-style (row-major) order
3 'dense' Fully Connected 128 fully connected layer
4 'dense_relu' ReLU ReLU
5 'output_layer' Fully Connected 10 fully connected layer
6 'output_layer_softmax' Softmax softmax
7 'ClassificationLayer_output_layer' Classification Output crossentropyex with '0' and 9 other classes
---------------------------
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
---------------------------

답변 (1개)

Wang Chen
Wang Chen 2023년 4월 11일
Hi Ruben,
Is it possible for you to upgrade to R2022a or higher version of MATLAB?
Alternatively, In R2021b, If your network is a SeriesNetwork type, the nnet.keras.layer.FlattenCStyleLayer is also suppored.
Thanks,
Wang
  댓글 수: 3
Wang Chen
Wang Chen 2023년 4월 18일
Hi Ruben,
DAGNetworks is also supported by Deep Learning HDL Toolbox in general, but when a DAGNetwork contains "nnet.keras.layer.FlattenCStyleLayer" layer, please use R2022a or later version of the Deep Learning HDL Toolbox.
Thanks,
Wang
Rubén
Rubén 2023년 4월 19일
편집: Rubén 2023년 4월 19일
Understood. Thank you for your support
The question comes because in deploy documentation it is only mentioned that series network can be deployed: "The Deep Learning HDL Toolbox™ Support Package for Intel FPGA and SoC Devices enables you to deploy your custom series deep learning network, and custom deep learning processor IP on the hardware."

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

카테고리

Help CenterFile Exchange에서 System Integration of Deep Learning Processor IP Core에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by