>>> import torch >>> import numpy as np >>> x = np.array([[2., 4., 6.]]) >>> y = np.array([[1.], [3.], [5.]]) >>> m = torch.mul(torch.from_numpy(x), torch.from_numpy(y)) >>> m.numpy() array([[ 2., 4., 6.], [ 6., 12., 18.], [10., 20., 30.]])

https://realpython.com/pytorch-vs-tensorflow/