classificationLayer cannot output one-hot encoded matrix?

조회 수: 4 (최근 30일)
Xiaolong
Xiaolong 2019년 7월 10일
댓글: Sanjana Sankar 2019년 7월 30일
openExample('nnet/ConstructAndTrainAConvolutionalNeuralNetworkExample')
In this demo, the output of the net was a categorical vector.
But in most of the cnn tutorials, the output should be one-hot encoded. Why does matlab use a categorical vector instead?
How to feed a one-hot encoded matrix to the net? The function trainNetwork() does not accept this kind of Y data.
Is the classificationLayer itself implemented one-hot encoding?
  댓글 수: 2
Maria Duarte Rosa
Maria Duarte Rosa 2019년 7월 11일
Hi Xiaolong, Thanks for your question. Is there a particular reason (apart from seeing in other cnn tutorials) why you think one-hot encoded outputs are better over categorical vectors? Do you have a particular use case? I'm just trying to understand your feedback/question.
Sanjana Sankar
Sanjana Sankar 2019년 7월 30일
Hi can someone tell me how to do one hot encoding in MATLAB to feed to a network?

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

답변 (1개)

Himanshu tripathi
Himanshu tripathi 2019년 7월 10일
Hey Xiaolong,
Why do you want to feed one hot encoded Y to the net?
The function trainNetwork() does not accept one hot encoded matrix and it's expected behaviour as per documentation.

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by