awslabs / keras-apache-mxnet

[DEPRECATED] Amazon Deep Learning's Keras with Apache MXNet support
https://github.com/awslabs/keras-apache-mxnet/wiki
Other
289 stars 65 forks source link

Weighted Loss Function feature requirement #267

Open kdgutier opened 3 years ago

kdgutier commented 3 years ago

Hi I am using the keras-mxnet api, I am finding it hard to declare a weighted loss function.

I know it cannot be registered with mxnet backend. There is no available example here https://github.com/awslabs/keras-apache-mxnet/blob/master/keras/losses.py#L77 for a weighted loss.

Is there a keras backend operation can help to do a basic matrix multiplication on the batch dimension.