When using the nn.BCEloss the target  has to be a tensor with dtype Float whereas nn.CrossEntropyLoss it has to be Long.
Why is that so? Why not stick to either Long or Float?
It make it difficult to create a wrapper since we cannot cast the input/target to a specific (static) dtype, thus one either have to make a try/catch statement, do the conversion based on an error-message, which of calls for a lot of unnecessary checks