Assuming “between them” means neighboring features, a view and mean operation should work:
batch_size = 10
features = 20
x = torch.arange(batch_size*features).view(batch_size, features).float()

x = x.view(batch_size, -1, 2)
y = x.mean(dim=2)
print(y)