필터 지우기
필터 지우기

Work Around for Convolution1DLayer

조회 수: 59 (최근 30일)
Kevin Monahan
Kevin Monahan 2024년 8월 7일 20:01
댓글: 2024년 8월 17일 12:15
I am trying to do code generation of a trained deep learning network however it uses a convolution1dlayer. It seems this is not currently supported by matlab. What are some possible solutions to this problem?

답변 (4개)

Aditya
Aditya 2024년 8월 7일 20:14
편집: Aditya 2024년 8월 7일 20:14
Hi Kevin,
Please do refer to this MATLAB answer post by MathWorks Support Team on the same issue: Is code generation supported for "convolution1DLayer"? - MATLAB Answers - MATLAB Central (mathworks.com)
Hope this helps!

Ram Kokku
Ram Kokku 2024년 8월 7일 21:07
편집: Walter Roberson 2024년 8월 7일 21:56
Convolution1DLayer supports code generation in the latest (R2024a) version of MATLAB. See the extended capabilities section : here - https://www.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.convolution1dlayer.html

Steven Lord
Steven Lord 2024년 8월 7일 21:11
Are you certain that you're using release R2024a? It appears from the Release Notes that support for generating code from this layer was added in release R2024a.
  댓글 수: 3
Ram Kokku
Ram Kokku 2024년 8월 8일 0:25
@Kevin Monahan, use TargetLibrary=none (https://www.mathworks.com/help/coder/ref/coder.deeplearningconfig.html). Both MATLAB Coder and GPU Coder support TargetLibrary=none. so, you should be able to generate both C/C++ and CUDA. For Better performance, you may need to explicit enable hardware features like instructionset (AVX2, AVX512) and multi-threading. See https://www.mathworks.com/help/coder/ug/optimize-generic-c-cpp-code-performance.html for more details.
森
2024년 8월 17일 12:15
I meet the same problem when generating coder containg Convolution1DLayer using TargetLibrary=none, and I also use the version 2024a. So this means actualy version 2024a stiil does not support the code generation for Convolution1DLayer?

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


Matt J
Matt J 2024년 8월 7일 21:35
편집: Matt J 2024년 8월 7일 21:36
Why not just use a convolution2dLayer? A 1D input is just a special case of a 2D input.
  댓글 수: 2
Kevin Monahan
Kevin Monahan 2024년 8월 7일 21:45
I did not make the model. It was given to me pretrained. I need to take it and move it out of Matlab for future research.
Matt J
Matt J 2024년 8월 7일 22:15
편집: Matt J 2024년 8월 7일 22:16
Why does that matter? It was given to you, but surely you can use replaceLayer to swap the 1D convolutional layers for 2D ones.

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

카테고리

Help CenterFile Exchange에서 Deep Learning with GPU Coder에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by