フィルターのクリア

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 Center および File ExchangeSequence 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