data = [[1, 2], [3, 4]] x_data = torch.tensor(data). From a NumPy array. Tensors can be created from NumPy arrays (and vice versa - see Bridge with NumPy).
確定! 回上一頁