As far as I know, the Softmax function is applied per channel. How do I apply this per row? And how do I apply this to the custom layer

1 Comment

If you tranpose the data (rotate), then apply on resultant.

Sign in to comment.

 Accepted Answer

Mahesh Taparia
Mahesh Taparia on 31 May 2021

1 vote

Hi
It seems you want to perform the softmax function as per your data/feature dimension. In this case you can create a custom loss layer and define the softmax operation inside that as per your need. You can refer this documentation for custom loss function creation. Also, refer this documentation for custom training loop workflow. Moreover, refer this documentation for custom layer creation.
Hope it will help!

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Products

Release

R2020b

Community Treasure Hunt

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

Start Hunting!