Implementation of weighted softmax by extending mx.autograd.Function fails

See my other answer to your post: I would recommend using a custom op: