Input and output size for deep learning regression

조회 수: 7 (최근 30일)
SA Yoganathan
SA Yoganathan 2020년 3월 17일
답변: Uttiya Ghosh 2020년 6월 18일
Hi everyone,
I have the following input and target matrix
Input: 110 samples of 273x262
Target: 110 samples of 273x262
I have to work on deep learning regression problem with a simple layers as shown below
Layer: [imageInputLayer()
convolution2dLayer(5,16,'Padding','same')
batchNormalizationLayer
reluLayer
fullyConnectedLayer()
regressionLayer]
What is the matrix size I have to use for the inputlayer and fullyconnectedlayer?
I am thinking of 4D matrix of size [273, 262, 1, 110] for inputlayer and a 2D matrix of size [273*263, 110] for output layer.
Is this correct? Will this exceed the matrix array size preference? Any other suggestions. Thank you

채택된 답변

Uttiya Ghosh
Uttiya Ghosh 2020년 6월 18일
Hi SA,
From my understanding, you are working with grayscale images on a deep learning regression model. You are expecting a output in the form of a matrix for each image and not a single valued scalar output.
For imageInputLayer, size of the input data is specified as a row vector of integers [h w c], where h, w, and c correspond to the height, width, and number of channels respectively. You do not need to specify the number of samples. Hence, as per my understanding, the inputSize should be a row vector [273, 262, 1].
For fullyConnectedLayer, output size must be a positive integer. You shall not specify the sample size here as well. Hence as per my understanding, the outputSize should be 273*262.
For more information, refer to the following links.

추가 답변 (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