indexing 딥러닝

print(x[:, 1])

add 딥러닝

y = torch.rand(5, 3)print(x + y)


print(torch.add(x, y))

get size() 딥러닝

print(x.size())

ones() 딥러닝

x = x.new_ones(5, 3, dtype=torch.double)      # new_* methods take in sizesprint(x)

init tensor with data 딥러닝

x = torch.tensor([5.5, 3])print(x)

1 2 3 4 5