I had to use torch.argmax before calculate the loss to have a correct loss and could advance in the training.
I am using now CrossEntropyLoss() because I was thinking about my problem and I have a multiclass problem. I have 88 possible class represented with 0 and 1, so I use torch.argmax to convert indexes in classes.
I think I am in the correct way.
Thanks.