how to fix the warning message always displayed when I want to classify images after augmentation process, the worning message is about preallocating

조회 수: 1 (최근 30일)
I have dataset of x-ray images, and I want to classify the dataset to normal and not_normal. I have used the augmentation process as shown in the following script:
augmenter = imageDataAugmenter( ...
'RandRotation',[-5 5],'RandXReflection',1,...
'RandYReflection',1,'RandXShear',[-0.05 0.05],'RandYShear',[-0.05 0.05]);
auimds = augmentedImageDatastore([224 224],imdsTrain,'DataAugmentation',augmenter);
netTransfer=trainNetwork(auimds,lgraph,options);
augtestimds=augmentedImageDatastore([224 224],imdsTest);
[predicted_labels(test_idx),posterior(test_idx,:)] = classify(netTransfer,augtestimds);
But every time there is a warning message appeare on the last statement, which is: [predicted_labels(test_idx),posterior(test_idx,:)] = classify(netTransfer,augtestimds);
The warning message said that the variable 'posterior' appears to change size on every loop iteration (within a script). consider preallocating for speed.
How can fix this issue?
Thanks in advance

답변 (0개)

카테고리

Help CenterFile Exchange에서 Pattern Recognition and Classification에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by