Why MultiLabelSoftMarginLoss and BCEWithLogitsLoss take float has input?

From my understanding these function takes one hot encoding labels, so 0 and 1 so why should they take float and not uint8?

I’m doing multi-class multi-labels classification so maybe it’s a particular case?