I’m doing a conditional sampling test from the results of the network
cond = torch.where(x> 0)
If the condition condition is not satisfied in a specific batch, 0 data is sampled from x and the mean is calculated, resulting in nan.
The solution, in my opinion, is to give each condition to the batch while running the for loop. Can I prevent this problem with other simple operations?