I need to learn a mapping from 28x28 images into a vector of 45 floating-point numbers. This is not really classification as the numbers range between -1 and 1.
When designing a deep neural network, what output layer could I use?
Best,
Samuli Siltanen

답변 (1개)

Asvin Kumar
Asvin Kumar 2019년 8월 29일

0 개 추천

You can use the tanhLayer to obtain output values in the range of –1 to 1.

댓글 수: 3

Samuli Siltanen
Samuli Siltanen 2019년 8월 29일
Thank you for your answer! However, it seems that I cannot use tanhLayer as an output layer:
Error using trainNetwork (line 165)
Invalid network.
Caused by:
Network: Missing output layer. The network must have one output layer.
Layer 18: Unused output. Each layer output must be connected to the input of another layer.
Asvin Kumar
Asvin Kumar 2019년 8월 30일
For the output layer, you can use a regressionLayer after the tanhLayer. This will produce predictions in the required range and compute the half-mean-squared-error loss.
Samuli Siltanen
Samuli Siltanen 2019년 8월 30일
Thank you so much! I will try this. Samu

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

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품

릴리스

R2019a

태그

질문:

2019년 8월 26일

댓글:

2019년 8월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by