title: MXNET custom loss function and eval_metric
body: <p>How do I create a custom loss function in MXNET? For example, instead of computing cross-entropy loss for one label (using standard mx.sym.SoftmaxOutput layer which computes cross-entropy loss and returns a symbol that can be passed as a loss symbol to the fit function), I want to compute weighted cross-entropy loss for each possible label. The MXNET tutorials mention using </p>
  
  <pre><code>mx.symbol.MakeLoss(scalar_loss_symbol, normalization='batch')
  </code></pre>
  
  <p>However, when I use <code>MakeLoss</code> function, the standard <code>eval_metric - "acc"</code> does not work (obviously as the model doesn't know what is my predicted probability vector). Therefore I need to write my own <code>eval_metric</code>. </p>
  
  <p>Further, at the time of prediction, I need to predict the probability vector as well, which cannot be accessed unless I group the final probability vector with the loss symbol and <code>block_grad</code> on it. </p>