(x)
return x.data
Variable => Tensor
Variable => Tensor
Variable = > Tensor
def to_tensor(x):
    """Variable => Tensor"""
    if torch.cuda.is_available():
        x = x.cpu()
    return x.data
def to_tensor ( x ) : if torch . cuda . is_available ( ) : x = x . cpu ( ) return x . data