In [1]:
import warnings
warnings.filterwarnings('ignore')
In [2]:
%matplotlib inline
%pylab inline
In [3]:
import torch
In [4]:
x = torch.Tensor(5, 3)
In [6]:
x.numpy()
Out[6]:
In [7]:
import numpy as np
a = np.ones(5)
b = torch.from_numpy(a)
In [8]:
b
Out[8]:
In [ ]: