필터 지우기
필터 지우기

Deep Learning for Regression

조회 수: 2 (최근 30일)
jason beckell
jason beckell 2017년 11월 8일
댓글: Rana S.Chegani 2018년 2월 8일
Hello to everyone,
I am a newbie to Deep Learning and I am having some problems with training a Convolutional Neural Network for regression. I have a boolean vector x (20x175), which is used as a training set, and a continuous vector y (20x1), which contains the labelled values associated to x. I would like to train a Convolutional Neural Network to predict the labelled values (Y_hat) of the boolean test set X (2480x175). This is the snippet of my code:
layers = [ ...
sequenceInputLayer(size(x,1))
convolution2dLayer(2,2)
reluLayer
fullyConnectedLayer(1)
regressionLayer];
options = trainingOptions('sgdm','InitialLearnRate',0.001, ...
'MaxEpochs',15);
net = trainNetwork(x,y,layers,options);
Y_hat = predict(net,X);
But at the last but one line I get the following exception:
Error using trainNetwork (line 140)
Index exceeds matrix dimensions.
What is it due to? And what can I do to solve such a problem? Many thanks for your kind attention and my best regrards,
Fabio.
  댓글 수: 3
Greg Heath
Greg Heath 2017년 11월 15일
It helps others to understand if you use the MATLAB variable conventions
inputs x,X
targets t,T
outputs y,Y
Hope this helps.
Greg
Rana S.Chegani
Rana S.Chegani 2018년 2월 8일
Hi, I think the problem is you are using convolution2dLayer , while your data is a 1D vector. This layer "The layer convolves the input by moving the filters along the input vertically and horizontally and computing the dot product of the weights and the input, and then adding a bias term.", rhile you don't have vertical and horizontal for each data sample. remove that and try it again, hopeful it helps

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by