keras-team/tf-keras

Tensorflow (model.predict) still prints progress bars when verbose=0

Closed this issue · 4 comments

I'm using the deepface library with tensorflow 2.11.1. For one of the detection methods, i.e. MTCNN, and for the face attribute analysis, it prints the progress bar like the below:
1/1 [==============================] - 0s 15ms/step
1/1 [==============================] - 0s 15ms/step
1/1 [==============================] - 0s 14ms/step
1/1 [==============================] - 0s 14ms/step
1/1 [==============================] - 0s 15ms/step
1/1 [==============================] - 0s 14ms/step
2/2 [==============================] - 0s 2ms/step
1/1 [==============================] - 0s 14ms/step
1/1 [==============================] - 0s 15ms/step

Unfortunately, because of this printing, my code is running for too long.

I tried to find the corresponding code in the deepface code and here are the lines:
emotion_predictions = models["emotion"].predict(img_gray, verbose=0)[0, :]
age_predictions = models["age"].predict(img_content, verbose=0)[0, :]
gender_predictions = models["gender"].predict(img_content, verbose=0)[0, :]
race_predictions = models["race"].predict(img_content, verbose=0)[0, :]
embedding = model.predict(img, verbose=0)[0].tolist()

If there is something wrong with the tensorflow version and I change it to a different version, I don't know what will happen to my other libraries and if they can still be run.

@sadegh6383,
Looks like code is incomplete. Request you to provide complete code to reproduce the issue in our environment. It helps us in localizing the issue faster.Please provide details about what platform you are using (operating system, architecture). Thank you!

This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.