python - Running two sessions of tensorflows with two seconds of delay each -


im using following code region of interest. im trying predict it. on here, 2 sessions running concurrently.

roi = frame[yw1:yw2 + 1, xw1:xw2 + 1, :] roi = cv2.resize(roi, (224, 224), interpolation=cv2.inter_cubic)  numpy_frame = np.asarray(roi) numpy_frame = cv2.normalize(numpy_frame.astype('float'), none, -0.5, .5, cv2.norm_minmax) numpy_final = np.expand_dims(numpy_frame, axis=0)  start_time = timeit.default_timer()  #how run following session every 2 seconds of intervals between each predictions = sess.run(softmax_tensor, {'car_model/input:0': numpy_final}) gender_pred = sess.run(tensor, {'bus_model/input:0': numpy_final}) 

the problem , lagging since both concurrent. how make 2 session run 2 seconds of interval gap between each?


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -