dimensions problem with processImagesMNIST

1 次查看(过去 30 天)
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