1

Do we have an equivalence for the following question, but with tensorflow : How to set class weights for imbalanced classes in Keras? ??

Jeremie
  • 33
  • 1
  • 3

1 Answers1

2

There's a function that does it automatically: tf.contrib.losses.softmax_cross_entropy(logits, onehot_labels, weight=weight)

David Masip
  • 6,136
  • 2
  • 28
  • 62