Error in minibatchqueue (line 290) numVariables = numel(getPreviewFromDatastore(originalDatastore));
Show older comments
Hi,
I am only trying to recreate this example: https://www.mathworks.com/help/images/unsupervised-medical-image-denoising-using-unit.html
I get this error :
------
Error in minibatchqueue (line 290)
numVariables = numel(getPreviewFromDatastore(originalDatastore));
Error in ourmodel (line 32)
mbqLDTrain = minibatchqueue(imdsLDTrain,MiniBatchSize=miniBatchSize, ...
------
Part of the code:
miniBatchSize = 1;
mbqLDTrain = minibatchqueue(imdsLDTrain,MiniBatchSize=miniBatchSize, ...
MiniBatchFormat="SSCB",DispatchInBackground=canUseGPU);
mbqHDTrain = minibatchqueue(imdsHDTrain,MiniBatchSize=miniBatchSize, ...
MiniBatchFormat="SSCB",DispatchInBackground=canUseGPU);
My matlab is R2021a version with Deep Learning Toolbox.
How do i fix this error ?
Thank You
9 Comments
Joss Knight
on 2 Apr 2022
Can you provide the error message? You've only provided the call stack.
Abu Yusuf
on 3 Apr 2022
Joss Knight
on 3 Apr 2022
That's not it Abu. I'm after the complete text of the error message - the red text shown in the command window that you're asking about.
Abu Yusuf
on 4 Apr 2022
Joss Knight
on 16 Apr 2022
There is more red text above this, you need show us all the red text.
Abu Yusuf
on 16 Apr 2022
Joss Knight
on 17 Apr 2022
Edited: Joss Knight
on 17 Apr 2022
If that's the case I can only assume you are using Live Script and the error message is stuck inside the live script window...or perhaps you're using Simulink? You see, every error comes with an error message (saying what the problem is) followed by the call stack (saying where the problem occurred). What you have given me is just the call stack. That makes it hard to diagnose your problem.
Let's try this: Please type the command that causes the error in the command window (not the editor), then copy-paste all the text output including the command you typed. The command that is erroring appears to be the following:
mbqLDTrain = minibatchqueue(imdsLDTrain,MiniBatchSize=miniBatchSize, ...
MiniBatchFormat="SSCB",DispatchInBackground=canUseGPU);
So type that, hit return, and then copy everything in the command window, including the above text, all the way down to the bottom, even if it doesn't fit on one screen, and paste it all here for us to look at. Thanks.
Abu Yusuf
on 18 Apr 2022
Joss Knight
on 18 Apr 2022
Great! So there's your answer. When you modified this example you presumably forgot to copy over the accompanying file augmentDataForLD2HDCT.m.
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

