Julien_Guegan:

It is now torch.int64 , should I parse it to float ?


It depends what your use case is.
Based on this code:
 out = model(inputs)
_, predictions = torch.max(out, 1)

it seems you are dealing with a multi-class classification (or segmentation) and the out tensor would have the shape [batch_size, nb_classes, *].
If that’s the case, you should use nn.CrossEntropyLoss and the target tensor should be a LongTensor in the shape [batch_size, *] containing the class indices in the range [0, nb_classes-1].
On the other hand you are using nn.BCEWithLogitsLoss, which is used for a binary or multi-label classification.
Could you explain your use case a bit?