How can we make the following for loop calculated in parallel and get the result? Please give a runnable example. Thanks.
“”"
Participated_Workers = [1,5,8]
for P in zip(Participated_Workers ):
loss_worker, temp = worker_new(net_state_dict, VGG, CUDAA, P[0], Itr, data[cs1]]))
net_parameters_SGD.append(temp_SGD[0])
cs1 += 1
“”""