parallel make_prediction in postprocessing
Parallel make prediction in postprocessing
The make_prediction
call is currently working serially which consumes a lot of time! Implement an updated and faster version using a parallel approach.
Keep in mind, that the keras model cannot be used in a parallel process and must be reloaded in the parallel approach!
To load model use:
model = keras.models.load_model(model_name, custom_objects=model_class.custom_objects)
-
read the following and check if this solution works: https://python.tutorialink.com/predicting-in-parallel-using-concurrent-futures-of-tensorflow-keras-models/
Edited by Ghost User