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
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!