dimensions problem with processImagesMNIST

조회 수: 1 (최근 30일)
Orr Streicher
Orr Streicher 2021년 10월 28일
댓글: Anshika Chaurasia 2021년 11월 2일
Hi,
Im trying to load MNIST dataset based on the instructions here:
But for some reason when i call :
XTrain = processImagesMNIST(filenameImagesTrain);
i get the following error:
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.
Error in processImagesMNIST (line 31)
X = reshape(X,numCols,numRows,numImages);
Error in main (line 49)
XTrain = processImagesMNIST(filenameImagesTrain);
and when i call :
XTest = processImagesMNIST(filenameImagesTest);
i get the following error:
Error using reshape
Size vector elements should be nonnegative.
Error in processImagesMNIST (line 31)
X = reshape(X,numCols,numRows,numImages);
Does anyone know what im doing wrong?
Thanks
  댓글 수: 1
Anshika Chaurasia
Anshika Chaurasia 2021년 11월 2일
Hi,
I ran the code in MATLAB R2021a and R2021b and didn't get any error.
Which MATLAB version you are using?
Can you share the script which is throwing the error? This will help to reproduce the error at our end.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by