I got this error when I compute the BCELoss, any idea what might be the reason?

Traceback (most recent call last):
File “main.py”, line 255, in 
train(args)
File “main.py”, line 204, in train
train_loss, train_acc = train_epoch(train_dataloader, model, crit, optimizer, args, reverse_dictionary)
File “main.py”, line 67, in train_epoch
loss = crit(pred, label)
File “/share/data/speech/zewei/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 325, in call
result = self.forward(*input, **kwargs)
File “/share/data/speech/zewei/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/loss.py”, line 372, in forward
size_average=self.size_average)
File “/share/data/speech/zewei/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/functional.py”, line 1179, in binary_cross_entropy
return torch._C._nn.binary_cross_entropy(input, target, weight, size_average)
RuntimeError: reduce failed to synchronize: device-side assert triggered

an it comes with 128 assertion fails like the following:

/pytorch/torch/lib/THCUNN/BCECriterion.cu:30: Acctype bce_functor<Dtype, Acctype>::operator()(Tuple) [with Tuple = thrust::detail::tuple_of_iterator_references<thrust::device_reference, thrust::device_reference, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, Dtype = float, Acctype = float]: block: [0,0,0], thread: [125,0,0] Assertion input >= 0. && input <= 1. failed.
/pytorch/torch/lib/THCUNN/BCECriterion.cu:30: Acctype bce_functor<Dtype, Acctype>::operator()(Tuple) [with Tuple = thrust::detail::tuple_of_iterator_references<thrust::device_reference, thrust::device_reference, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, Dtype = float, Acctype = float]: block: [0,0,0], thread: [126,0,0] Assertion input >= 0. && input <= 1. failed.
/pytorch/torch/lib/THCUNN/BCECriterion.cu:30: Acctype bce_functor<Dtype, Acctype>::operator()(Tuple) [with Tuple = thrust::detail::tuple_of_iterator_references<thrust::device_reference, thrust::device_reference, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, Dtype = float, Acctype = float]: block: [0,0,0], thread: [127,0,0] Assertion input >= 0. && input <= 1. failed.