0

I want to run my function in parallel, however all examples contain only an i variable. I tried to apply all methods in Parallel for Loop in Python.

One of my function is below. If I can solve problem for this function, I can handle other functions too.

def forlooptest(testX,N,kernel_matrix):
    for i in range(0,10000):
        if i % 100 == 0:
            print(i)
        for j in range(0,3):
            img = testX[i,:,:,j]
            filtered_img = sr_cnn(img,N,kernel_matrix)
            testX_new[i,:,:,j]= filtered_img.astype(np.uint8)
    return testX_new

Could you help me?

0 Answers0