from functools import reduce
import torch
a = torch.tensor([1, 4])
b = torch.tensor([4, 7])
list1 = [a, b]
c = torch.tensor([7, 8])
d = torch.tensor([6, 12])
list2 = [c, d]
output = reduce(lambda x, y: x + y, map(lambda z: z[0] * z[1], zip(list1, list2)))
print(output)
out: tensor([ 31, 116])