Why am i getting 'Not enough input arguments?

조회 수: 1 (최근 30일)
Ignacio Acevedo
Ignacio Acevedo 2021년 3월 24일
답변: Gaurav Garg 2021년 3월 30일
function out = CodeNNet(in)
persistent NNet
if isempty(NNet)
NNet = coder.loadDeepLearningNetwork('NNet.mat');
end
out = predict(NNet,in);
cfg = coder.config('lib');
cfg.TargetLang = 'C++';
cfg.GenCodeOnly = true;
dlcfg = coder.DeepLearningConfig('arm-compute');
dlcfg.ArmArchitecture = 'armv8';
dlcfg.ArmComputeVersion = '20.02.1';
cfg.DeepLearningConfig = dlcfg;
codegen -args {ones(256,256,3,'single')} -config cfg CodeNNet
  댓글 수: 11
Ignacio Acevedo
Ignacio Acevedo 2021년 3월 27일
Like a script where the function is called and tested with a test input?
Walter Roberson
Walter Roberson 2021년 3월 28일
The
codegen -args {ones(256,256,3,'single')} -config cfg CodeNNet
should not be part of the source code, and the function name must go before the -args

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

답변 (1개)

Gaurav Garg
Gaurav Garg 2021년 3월 30일
Hi,
From what seems to be the problem so far-
You should not include
codegen -args {ones(256,256,3,'single')} -config cfg CodeNNet
in your source code.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by