Pytorch小迈步

查看pytorch版本 

import torch

print(torch.__version__)

查看pytorch是CUDA版还是CPU版

import torch

print(torch.cuda.is_available()) 

a = 3
b = 4
c = (a ** 2 + b ** 2) ** 0.5
c

p = lambda a,b: (a**2 + b**2) ** 0.5
p(1,2)

a = InputParameterPlaceholder()
b = InputParameterPlaceholder()
c = (a**2 + b**2) ** 0.5
callable(c) 

你可能感兴趣的:(Pytorch)