dimensions problem with processImagesMNIST

1 Ansicht (letzte 30 Tage)
Orr Streicher
Orr Streicher am 28 Okt. 2021
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 Kommentar
Anshika Chaurasia
Anshika Chaurasia am 2 Nov. 2021
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by