Why am i getting 'Not enough input arguments?

3 views (last 30 days)
function out = CodeNNet(in)
persistent NNet
if isempty(NNet)
NNet = coder.loadDeepLearningNetwork('NNet.mat');
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
Walter Roberson
Walter Roberson on 28 Mar 2021
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

Sign in to comment.

Answers (1)

Gaurav Garg
Gaurav Garg on 30 Mar 2021
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.


Find more on Deep Learning with GPU Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by