How to transfer an existing tensor to another device based on other tensor
For example <SCODE>tensor_a is currently in cpu
I wanna transfer tensor_a to cpu or gpu based on 
tensor_b's residential state.
<ECODE>
ypxie
<SCODE>tensor_a = tensor_a.cuda(b.get_device()) if b.is_cuda else tensor_a
<ECODE>
apaszke
good to know that, thanks!
ypxie