For clarification:
the predictions of my network are:
In[1]: preds = network(batch.x, batch.edge_index, batch.edge_weights)
      preds

Out[1]:
tensor([[ 0.9925, -1.0165], <-- all nodes predicted as class 0
        [ 0.9925, -1.0165],
        [ 0.9925, -1.0165],
        ...,
        [ 0.9925, -1.0165],
        [ 0.9925, -1.0165],
        [ 0.9925, -1.0165]], dtype=torch.float64, grad_fn=<AddBackward0>)

And my labels are:
In[2]: F.one_hot(batch.y)
Out[2]:
tensor([[1, 0], <-- first node is class 0
        [1, 0],
        [0, 1], <-- third node is class 1
        ...,
        [0, 1],
        [1, 0],
        [1, 0]])

Now I want to calculate the the loss and I want to punish the system if it makes false predictions on the nodes from category 1. So is this the right way? Because no matter how I change the weight_class, the prediction stays the same…
weight_class = torch.tensor([1,4])
loss = F.binary_cross_entropy_with_logits(preds, F.one_hot(batch.y).double(), weight = class_weight)