you could try,
tuple([t.mean(dim=1) for t in sample])

Example,
sample = (torch.randn(3,1), torch.randn(3,2), torch.randn(3,1))
>>> sample
(tensor([[-0.6243],
        [ 0.2206],
        [-1.9922]]), tensor([[-0.7084,  2.9351],
        [-0.8864, -0.7852],
        [-0.3822,  0.1747]]), tensor([[-2.1211],
        [ 1.0442],
        [ 0.8821]]))
>>> tuple([t.mean(dim=1) for t in sample])
(tensor([-0.6243,  0.2206, -1.9922]), tensor([ 1.1134, -0.8358, -0.1038]), tensor([-2.1211,  1.0442,  0.8821]))