Hi Georges!



 gquenot:

It happens that the following works:
…
So pos_weight should have the same size as input and target (without the batch axis) but this is not clear in the documentation.


Thanks.  That makes it pretty clear what is going on.
I would call this a bug.  It somewhat defeats the purpose of
pos_weight, and, in my view, breaks its semantics.  (In any
event, I would say it’s at least a documentation bug.)
Perhaps someone like @albanD could take a look …
Best.
K. Frank