title: Parallel execution of model prediction in a for loop
body: <p>I want to run predictions of a keras model on my input several times in a for loop. Is there a way to parallelize this for loop as each iteration of the loop is independent of the other? I just want to store the predictions of each iteration in the <code>mc_predictions</code> array.</p>
  
  <pre><code>mc_predictions = []
  for i in range(100):
      y_p = model.predict(x)
      mc_predictions.append(y_p)        
  </code></pre>
  
  <p>I am using a dropout layer in my model wheer I have set the training attribute to True. Hence, every time I would be getting different results as different neurons would be deactivated in each iteration. I am using monte carlo estimation here.</p>