Problem with setting weights for BCEWithLogitsLoss-binary problem

Here you set the weights to 500 and you have one class only? Shouldn’t it be 2? Check this please.