import torch 

batchSize = 3
modeFiled = torch.randn([10, 64, 64])
paras = torch.randn([batchSize, 10])

# your method
your_method_result = []
for bat in range(batchSize):
    res = 0 
    for i in range(10):
        res += modeField[i] * paras[bat][i]
    your_method_result.append(res)
your_method_result = torch.stack(your_method_result, dim=0)

# faster implementation
result = torch.matmul(paras, modeField.view(10, -1)).view(batchSize, 64, 64)

# show differents, it should be 1e-6
print((your_method_result - result).abs().max())