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:
[email protected]


With regards,
Apache Git Services

Reply via email to