3

I want to predict values by using the model I use this code

from keras.models import load_model
import multiprocessing
model = load_model('CNN_MODEL.hdf')
def Net(x):
    print("test")
    return model.predict(x)

X_test=.....(a list )
pool=multiprocessing.Pool(processes=12)
Y=pool.map(Net,X_test)

pool.close()
pool.join()

But it's too slow . The out is

test test test ... test with 12 test and then Stuck. And my cpu is 36 core . How to solve it?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.