Yes good call, thanks!  Your suggestion is better than what I did later, which is use cond = cond.type(dtype_float) where I switch off dtype_float = torch.cuda.FloatTensor or torch.FloatTensor.  .float() will happily keep it on whichever device (CPU/GPU).  I’ll edit that code snippet so if anybody copy/pastes, that’s already handled.