Effacer les filtres
Effacer les filtres

Deep Learning for Regression

2 vues (au cours des 30 derniers jours)
jason beckell
jason beckell le 8 Nov 2017
Commenté : Rana S.Chegani le 8 Fév 2018
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 commentaires
Greg Heath
Greg Heath le 15 Nov 2017
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 le 8 Fév 2018
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

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by