Borrar filtros
Borrar filtros

Deep Learning for Regression

2 visualizaciones (últimos 30 días)
jason beckell
jason beckell el 8 de Nov. de 2017
Comentada: Rana S.Chegani el 8 de Feb. de 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 comentarios
Greg Heath
Greg Heath el 15 de Nov. de 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 el 8 de Feb. de 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

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by