Deep learning with vector output

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

Risposte (1)

Asvin Kumar
Asvin Kumar il 29 Ago 2019

0 voti

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

3 Commenti

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.
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.
Thank you so much! I will try this. Samu

Accedi per commentare.

Categorie

Scopri di più su Deep Learning Toolbox in Centro assistenza e File Exchange

Prodotti

Release

R2019a

Richiesto:

il 26 Ago 2019

Commentato:

il 30 Ago 2019

Community Treasure Hunt

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

Start Hunting!

Translated by