Error using .' Transpose on ND array is not defined. Use PERMUTE instead.
조회 수: 3 (최근 30일)
이전 댓글 표시
I have this code but it give to me this error, how I can fix it?
% Pass CNN image features to trained classifier
predictedLabels = predict(classifier, testFeatures); _this is the code I want to compile_
[X,varargin] = orientX(X,expectedObsInRows,varargin)
% Copyright 2015 The MathWorks, Inc.
[obsIn,~,varargin] = ...
internal.stats.parseArgs({'observationsin'},{'rows'},varargin{:});
obsIn = validatestring(obsIn,{'rows' 'columns'},...
'classreg.learning.internal.orientX','ObservationsIn');
obsInRows = strcmp(obsIn,'rows');
if expectedObsInRows~=obsInRows
X = X.'; _at this line I have the error mentioned_
end
end
Thank you so much
댓글 수: 0
답변 (1개)
Walter Roberson
2018년 4월 22일
Your testFeatures needs to be 2D, not 3D.
Be careful if you are working with images: RGB images are 3D.
댓글 수: 3
Muhammad Umer Farooq
2018년 8월 4일
I also receive same error. I check my X is 4D. How i will know which row-columns i need to rearrange using premute?
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!