Thanks for the debugging!
Could you post the stats of BCE, before this assertion is triggered?
Using the stats of the tensor (min/max/mean), we could try to rerun the offending line of code with random values until we run into the same error and can debug further.