Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it fit for the real world? #3

Open
Ram8626 opened this issue Sep 10, 2022 · 0 comments
Open

Is it fit for the real world? #3

Ram8626 opened this issue Sep 10, 2022 · 0 comments

Comments

@Ram8626
Copy link

Ram8626 commented Sep 10, 2022

Because, When I run this codes it takes 30-40 seconds to start.
And the warning is
WARNING:tensorflow:5 out of the last 118 calls to <function Model.make_predict_function..predict_function at 0x0000017B38050940> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.

suggest me better way to run this code. Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant