Clear Filters
Clear Filters

how i can fix internal change in number of elements in yolo v4 network while training

39 views (last 30 days)
Error using reshape
Number of elements must not change. Use [] as one of the size inputs to automatically calculate the appropriate size for that dimension.
iou(:,:,:,batchSize) = reshape(maxOverlap,h,w,c);
iou = iGetMaxIOUPredictedWithGroundTruth(bx,by,bw,bh,groundTruth,isRotatedBox);
[boxTarget, objectnessTarget, classTarget, objectMaskTarget, boxErrorScale] = iGenerateTargets(gatheredPredictions, YTrain, params.InputSize, params.AnchorBoxes, penaltyThreshold, isRotatedBox);
lossFcn = @(varargin) calculateLoss(lossParams,isRotatedBox,varargin);
loss = lossFcn(networkOutputs{:},targets{:});
[varargout{1:nargout}] = fun(x{:});
[varargout{1:nargout}] = deep.internal.dlfeval(fun,varargin{:});
Error in dlfeval (line 31)
[varargout{1:nargout}] = deep.internal.dlfevalWithNestingCheck(fun,varargin{:});
[loss,grad,state,networkOutputs,lossData] = dlfeval(@modelGradients,self.Network,self.LossFcn,...
net = fit(networkTrainer);
[trainedDetector,infoTrain] = images.dltrain.internal.dltrain(mbq,detector,options,lossFcn,metrics,validationPatienceMetric,'ExperimentMonitor',params.ExperimentMonitor);
I have single class dataset withy class name person and this is error i am facing a time of training, i have gpu compute capacity 5.2 with gpu Nvidia M400
what could be issue here , i am cofuse that is it with preprocessing or compute capacity
  3 Comments
Joss Knight
Joss Knight on 19 Aug 2024 at 21:22
Maaz, what is your training data and responses? My guess is that your training targets do not match the data. You will need to provide more code.

Sign in to comment.

Answers (0)

Categories

Find more on Computer Vision Toolbox in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!