diff --git a/0_multiply.py b/0_multiply.py new file mode 100644 index 0000000..00cb18d --- /dev/null +++ b/0_multiply.py @@ -0,0 +1,6 @@ +import torch + +a = torch.IntTensor([2, 3, 4]) +b = torch.IntTensor([3, 4, 5]) +m = a * b # element-wise product +print(m.numpy()) # convert to the numpy array [ 6 12 20]