Why am i getting 'Not enough input arguments?

1 Ansicht (letzte 30 Tage)
Ignacio Acevedo
Ignacio Acevedo am 24 Mär. 2021
Beantwortet: Gaurav Garg am 30 Mär. 2021
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 Kommentare
Ignacio Acevedo
Ignacio Acevedo am 27 Mär. 2021
Like a script where the function is called and tested with a test input?
Walter Roberson
Walter Roberson am 28 Mär. 2021
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

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Gaurav Garg
Gaurav Garg am 30 Mär. 2021
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.

Kategorien

Mehr zu Deep Learning with GPU Coder finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by