2016-08-30 7 views

答えて

1

使用:type()テンソルの方法:

cutorch = require('cutorch') 

x = torch.Tensor(3,3) 
x = x:cuda() 

if x:type() == 'torch.CudaTensor' then 
    print('x is CUDA tensor') 
else 
    print('x is normal tensor') 
end 
関連する問題