Loss Function for Probability Output

I have a dataset in which the I/P is an image and the O/P is a probability value i.e, a decimal value in the range [0,1]. Which loss functions can I use for training a CNN with this dataset? Cross Entropy seems not to support floating points as its meant for a classification problem while the given problem is more of a regression.

You can use binary cross-entropy: BCELoss — PyTorch 1.8.1 documentation.

Note that you can also express the problem with cross-entropy and two classes: one of the classes is ‘0’ and the other is ‘1’. You can simply use the softmax output of the ‘1’ class as your prediction in this case.