# MXNet.jl - weighted classes in SoftmaxOutput

**URL:** https://discourse.julialang.org/t/mxnet-jl-weighted-classes-in-softmaxoutput/4925
**Category:** Machine Learning
**Tags:** mxnetjl
**Created:** [July 18, 2017, 12:15pm UTC](https://discourse.julialang.org/t/mxnet-jl-weighted-classes-in-softmaxoutput/4925 "2017-07-18T12:15:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)
#### Post date: [July 18, 2017, 12:15pm UTC](https://discourse.julialang.org/t/mxnet-jl-weighted-classes-in-softmaxoutput/4925/1 "2017-07-18T12:15:40Z")

</div>

I’m using MXNet.jl to write a binary classifier for a problem with class imbalance. I’d like to weight the two classes unequally when calculating the loss (i.e. a false positive would be weighted differently than a false negative). Is it possible to pass mx.SoftmaxOutput a vector of weights to use when calculating the loss?
