As titled, is there any concise/fast way?
torch.zeros(sizes, device=‘cuda’)
Will that make a difference between this and torch.zeros(sizes).to(device)?
torch.zeros(sizes, device=device) won’t copy. functionally they are the same
As titled, is there any concise/fast way?
torch.zeros(sizes, device=‘cuda’)
Will that make a difference between this and torch.zeros(sizes).to(device)?
torch.zeros(sizes, device=device) won’t copy. functionally they are the same