yes it works.  Here’s something close-ish to what you are trying:
F.binary_cross_entropy(Variable(torch.rand(3,4), requires_grad=True), Variable(torch.randn(3,4), requires_grad=True), weight=Variable(torch.randn(4,4), requires_grad=True)[:,3])
Can you come up with a minimal example that demonstrates your issue?