jonathanbratt / jonathanbratt/RBERT

figure out TF warning message

Open
#62 0 comments 0 reactions 1 assignee Claimed by @jonathanbratt View on GitHub
Dominant language
R
Stars
166
Forks
19
PR merge metrics
No merged PRs in 30d

Description

It doesn't complain right away, but if you run enough models, you get a message like:

> WARNING:tensorflow:5 out of the last 6 calls to .predict_function at 0x7fa8913872f0> 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.