SoftmaxTransform Operator
For some reason, I wanna use Softmax as a transformation and use my own loss function for backprop. However, I cannot find a place to change this setting and currently, it seems that even if I explicitly send grad to executor.backward([grad]). It still uses the Softmax default gradient...
I've seen that there is this "need_top_grad" in Naive_ops, but where can I find such thing for Softmax?
Thanks
Softmax (recently renamed to SoftmaxOutput) is a loss layer. It's not intended to be used as internal layers. There was a discussion on this: https://github.com/dmlc/mxnet/issues/426
However there is an easy patch for your need you can do. Cudnn provide softmax implementation for internal layers. You can modify the cudnn_activation-inl.h file under src/operator and add a new activation with cudnn API.
If you figured out a solution, your are welcome to contribute to mxnet by submitting PR.
This is discussed to be added as SoftmaxTransform Operator. cc @antinucleon Please let us know if you are interested in contributing
See if I have time tomorrow
will try to do it
Should that be a stand-alone operator or should it be included in the activation operator ?
I think we can do it in a standalone one, as this is quite different from elementwise activations
Then we need both softmaxtransform and cudnn softmax transform On Nov 6, 2015 9:52 AM, "Tianqi Chen" [email protected] wrote:
I think we can do it in a standalone one, as this is quite different from elementwise activations
— Reply to this email directly or view it on GitHub https://github.com/dmlc/mxnet/issues/472#issuecomment-154484363.
These two can be done in one ops, like currently Convolution
Agree to @piiswrong
Let us see if there is any updates on this
Softmax transform is now supported via layer SoftmaxActivation.