If by this you mean that each individual training sample is assigned a
ground-truth target of either0.0or1.0, I would call this a binary
value (although still technically a scalar).
For a binary classification problem BCEWithLogitsLoss will be your
best choice for the loss function.
You could, but general experience shows that for binary classification MSELoss won’t work nearly as well as BCEWithLogitsLoss.
If your ground-truth target value were a (morally speaking) continuous
variable, then MSELoss would be the sensible choice.
For example, if you were training a network to predict the price of used
cars (given, say, model, miles, age, rust, etc.) and your training data
included known prices, the MSELoss would be the natural choice.