Parallelizing model predictions in keras using multiprocessing for python
问题 I'm trying to perform model predictions in parallel using the model.predict command provided by keras in python2. I use tensorflow 1.14.0 for python2. I have 5 model (.h5) files and would like the predict command to run in parallel.This is being run in python 2.7. I'm using multiprocessing pool for mapping the model filenames with the prediction function on multiple processes as shown below, import matplotlib as plt import numpy as np import cv2 from multiprocessing import Pool pool=Pool()