Alright so I changed my last layer to a single output and added .squeeze() to remove the extra dimension, and that solved the dimension issue, but now I’m getting an another error:
    return torch.binary_cross_entropy_with_logits(input, target, weight, pos_weight, reduction_enum)

RuntimeError: result type Float can't be cast to the desired output type Long

Do you guys know what caused this to happen and how to solve it?