How to transform Variable into numpy?
When I used pytorch, I met a problem that I can not transform Variable into numpy. When I try to use torch.Tensor or transform it into torch.FloatTensor, but it’s fail. So how can I to solve this problem?
cumttang
edgarriba
apaszke
cumttang
Morpheus_Hsieh
Morpheus_Hsieh
Yes, it’s working: (Variable(x).data).cpu().numpy()
Robi
blitu12345
Is there a function which handles both CUDA and CPU at once?
Royi
what will type if cuda tenso is fp16 than after converting it will numpy(fp32) or numpy(fp16)?
Nitin286roxs