Do we have an equivalence for the following question, but with tensorflow : How to set class weights for imbalanced classes in Keras? ??
Asked
Active
Viewed 4,465 times
1
-
Please ask a self-contained question, so we don't have to click on some link to understand what you are asking, and so we don't have to guess what you are asking. – D.W. Jun 02 '18 at 17:15
1 Answers
2
There's a function that does it automatically: tf.contrib.losses.softmax_cross_entropy(logits, onehot_labels, weight=weight)

David Masip
- 6,051
- 2
- 24
- 61