필터 지우기
필터 지우기

How to handle imagedatastore when input and response have different dimension?

조회 수: 3 (최근 30일)
I've been trying to train a network for 3D segmentation.
The input data is 3-dimensional array(or image), its response is 4-dimensional array, loaded using imageDatastore. I want to start training of network, but I faced error messages, which is below. This error raised because dimension of the input and its reponse doesn't matched(input:3d vs response:4d).
Is there any way to give combinedDatastore which consists of different dimensions of input and response to trainNetwork function?
Error using trainNetwork
Error during read from datastore.
Error in resunet_test (line 72)
[net_, info] = trainNetwork(combine(trntf_input, trntf_label), net, opt);
Caused by:
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
Error in matlab.io.datastore.CombinedDatastore/read (line 146)
data = horzcat(data{:});

채택된 답변

Matt J
Matt J 2024년 2월 21일
편집: Matt J 2024년 2월 21일
Modify the trntf_input, trntf_label datastores' ReadFcn so that when it reads in the image, it wraps it in a 1x1 cell array. See also,

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by