Error in minibatchqueue (line 290) numVariables = numel(getPreviewFromDatastore(originalDatastore));
조회 수: 8(최근 30일)
표시 이전 댓글
Abu Yusuf
2022년 3월 31일
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
Joss Knight
2022년 4월 3일
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.
Joss Knight
2022년 4월 17일
편집: Joss Knight
2022년 4월 17일
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
2022년 4월 18일
Invalid transform function defined on datastore.
The cause of the error was:
Undefined function 'augmentDataForLD2HDCT' for input arguments of type 'double'.
Error in @(x)augmentDataForLD2HDCT(x,inputSize)
Error in matlab.io.datastore.TransformedDatastore/applyTransforms (line 607)
data = ds.Transforms{ii}(data);
Error in matlab.io.datastore.TransformedDatastore/read (line 222)
[data, info] = ds.applyTransforms(data, info);
Error in matlab.io.datastore.TransformedDatastore/preview (line 292)
dataFromRead = read(copyds);
Error in getPreviewFromDatastore (line 9)
previewData = preview(inputDatastore);
Error in minibatchqueue (line 290)
numVariables = numel(getPreviewFromDatastore(originalDatastore));
Joss Knight
2022년 4월 18일
Great! So there's your answer. When you modified this example you presumably forgot to copy over the accompanying file augmentDataForLD2HDCT.m.
채택된 답변
Joss Knight
2022년 4월 18일
Make sure the accompanying file augmentDataForLD2HDCT.m that comes with this example is on the path when you run your code.
댓글 수: 9
Joss Knight
2022년 4월 19일
"the accompanying file augmentDataForLD2HDCT.m that comes with this example"
Abu Yusuf
2022년 4월 19일
Please, I don't know where to find it.. Can you check if it is on the example page.
Joss Knight
2022년 4월 20일
Obviously you have to have the example open in MATLAB. I assumed you had done that otherwise how did you get the example running in the first place? You need to click on one of the big buttons at the top right of the example to open it in MATLAB. You can either open in MATLAB Online, or choose "Copy Command" and then run the openExample command in MATLAB:
openExample('images_deeplearning/UnsupervisedCTImageDenoisingUsingUNITExample')
Then you'll see the file augmentDataForLD2HDCT.m in your current folder.
Joss Knight
2022년 4월 21일
You probably don't have the Image Processing Toolbox, which seems to be required for this example. What is the output of the ver command?
Abu Yusuf
2022년 4월 21일
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.10.0.1602886 (R2021a)
MATLAB License Number: 968398
Operating System: Microsoft Windows 10 Professionnel Éducation Version 10.0 (Build 19043)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.10 (R2021a)
Simulink Version 10.3 (R2021a)
5G Toolbox Version 2.2 (R2021a)
Audio Toolbox Version 3.0 (R2021a)
Bioinformatics Toolbox Version 4.15.1 (R2021a)
Communications Toolbox Version 7.5 (R2021a)
Computer Vision Toolbox Version 10.0 (R2021a)
Control System Toolbox Version 10.10 (R2021a)
Curve Fitting Toolbox Version 3.5.13 (R2021a)
DSP System Toolbox Version 9.12 (R2021a)
Data Acquisition Toolbox Version 4.3 (R2021a)
Database Toolbox Version 10.1 (R2021a)
Datafeed Toolbox Version 6.0 (R2021a)
Deep Learning HDL Toolbox Version 1.1 (R2021a)
Deep Learning Toolbox Version 14.2 (R2021a)
GPU Coder Version 2.1 (R2021a)
Image Acquisition Toolbox Version 6.4 (R2021a)
Image Processing Toolbox Version 11.3 (R2021a)
Instrument Control Toolbox Version 4.4 (R2021a)
MATLAB Coder Version 5.2 (R2021a)
MATLAB Compiler Version 8.2 (R2021a)
MATLAB Compiler SDK Version 6.10 (R2021a)
MATLAB Parallel Server Version 7.4 (R2021a)
MATLAB Report Generator Version 5.10 (R2021a)
Mapping Toolbox Version 5.1 (R2021a)
Optimization Toolbox Version 9.1 (R2021a)
Parallel Computing Toolbox Version 7.4 (R2021a)
Partial Differential Equation Toolbox Version 3.6 (R2021a)
Signal Processing Toolbox Version 8.6 (R2021a)
SimBiology Version 6.1 (R2021a)
SimEvents Version 5.10 (R2021a)
Simscape Version 5.1 (R2021a)
Simscape Driveline Version 3.3 (R2021a)
Simscape Electrical Version 7.5 (R2021a)
Simscape Fluids Version 3.2 (R2021a)
Simscape Multibody Version 7.3 (R2021a)
Simulink 3D Animation Version 9.2 (R2021a)
Simulink Check Version 5.1 (R2021a)
Simulink Code Inspector Version 3.8 (R2021a)
Simulink Coder Version 9.5 (R2021a)
Simulink Compiler Version 1.2 (R2021a)
Simulink Control Design Version 5.7 (R2021a)
Simulink Coverage Version 5.2 (R2021a)
Statistics and Machine Learning Toolbox Version 12.1 (R2021a)
Symbolic Math Toolbox Version 8.7 (R2021a)
System Identification Toolbox Version 9.14 (R2021a)
Joss Knight
2022년 4월 21일
Well, that explains it. That example didn't exist in R2021a and doesn't work with it. Either upgrade MATLAB, or look for an example in the archive documentation that will work and which you can adapt for your purposes: https://www.mathworks.com/help/releases/R2021a/deeplearning/examples.html
추가 답변(0개)
참고 항목
범주
Find more on Model Statistics 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!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다: .
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)