Confusion:batchAdd supports cuda tensors

This PR adds support for target or prediction `torch.CudaTensors`. It also adds buffers for the `torch.max` to minimize memory allocations.