Is there anyway to set positive weight in bce_loss?

Does pytorch has loss function that is equivalent to tf.nn.weighted_cross_entropy_with_logits ?

https://www.tensorflow.org/api_docs/python/tf/nn/weighted_cross_entropy_with_logits

Now (since 0.4.1) you can use pos_weight argument of BCEWithLogitsLoss.

Thank you very much, that is what I needs.