@LeviViana, this hack worked a few times,it’s a shame I didn’t set seed, so the success never reproduced.When I used torch.mean(prob) as substitute, the loss always decreases gradually in iterations.So I think maybe it just too hard to train the model if we turn loss into 0,1 type.
Thank you again  for everything you’ve done