Based on the stack trace, this check 201 is failing in binary_cross_entropy_out_cuda and points towards an invalid target. Could you check the min. and max. values of your current target tensor and make sure its values are in the range [0, 1]?