You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/09/25 17:23:22 UTC
[GitHub] unrealwill commented on issue #8025: How to use softlabel in MXNET?
unrealwill commented on issue #8025: How to use softlabel in MXNET?
URL: https://github.com/apache/incubator-mxnet/issues/8025#issuecomment-331951934
You probably can make your own loss function
```
label = mx.symbol.Variable('label')
mlp = mx.symbol.FullyConnected(...)
pred = mx.symbol.softmax( mlp ,axis=1)
loss = mx.symbol.MakeLoss( mx.symbol.sum( - mx.symbol.log( pred ) *label ,axis=1) )
```
make sure to pass a label variable which sums to one.
I'm sure you can optimize it with the logsoftmax operators.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services