Solved by ptrblck in post #2 
              
              
                You could calculate the mean in the “kfold” dimension as given in this code snippet: 
total_preds = []
for _ in range(4): # kfold loop
    preds = []
    for _ in range(730): # data loop
        p = torch.randn(3)
        preds.append(p)
    preds = torch.stack(preds)
    total_preds.append(preds)

…