In the customized dataset file, in a multi-label context,
1/Is there a reason for the use of float() in addition to .astype(“float32”) in this code?
2/And why cast the labels to float and not leave it as a numpy array of integers(one-hot encoded)?
labels = torch.from_numpy(
item.iloc[1:].values.astype(“float32”)).float()
Thanks in advance