I have an imbalanced dataset,and my task is multi-label classification
this is my code for minimizing loss:
logits = inference(input)
xent = tf.nn.sigmoid_cross_entropy_with_logits(
logits=logits, labels=labels, name='xent')
loss = tf.reduce_mean(xent, name='loss_op')
now.I want to use weighted-loss
for my classification,exactly how can I do it?
Can I use this link,and replace softmax
with sigmoid
?
Point
I have read this link,but my case is not binary classification and in tensorflow_org I think it is for binary classification too.