필터 지우기
필터 지우기

Convolutional 1d net

조회 수: 2 (최근 30일)
Diego Alonso
Diego Alonso 2017년 10월 17일
댓글: Ash Ash 2018년 12월 14일
Hi everyone! I am trying to reproduce the convolutional network described in http://lemt.ufrj.br/pdf/pedro.pdf (Table 4.1). I am using as input a matrix 370x2401 and as a target another matrix 370x2401. The network's architecture is:
When I try to train the network appears the next message: Error using trainNetwork>iAssertCategoricalResponseVector (line 598) Y must be a vector of categorical responses.
I have used reshape function applied to input: X=reshape(input, 1,2401,1,370); When trying I used: trainNetwork(X,Y,layers,opts); where Y is the target matrix 370x2401. What am I doing wrong?
Thanks beforehand!

답변 (1개)

Sanjana Ramakrishnan
Sanjana Ramakrishnan 2017년 10월 19일
Please note that for image and sequence-to-label classification problems, Y must be a categorical vector of labels. Refer the below link: https://www.mathworks.com/help/nnet/ref/trainnetwork.html?searchHighlight=trainNetwork&s_tid=doc_srchtitle#inputarg_Y
In your code, the function 'trainNetwork' is expecting "Y" to be a categorical array, not a matrix. Consider using "categorical" function to convert "Y" into categorical array as below:
>> Y = categorical(Y);
Refer the below link:
https://www.mathworks.com/help/matlab/ref/categorical.html
  댓글 수: 1
Ash Ash
Ash Ash 2018년 12월 14일
Thank you!

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

카테고리

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