TF 2.3 - loading of saved_model from disk with ragged=True input is slower than ragged=False #43263
Labels
comp:keras
Keras related issues
stat:awaiting tensorflower
Status - Awaiting response from tensorflower
TF 2.3
Issues related to TF 2.3
type:performance
Performance Issue
System information
Google Colab Notebook with TF 2.3
Describe the current behavior
Loading saved model with input
tf.keras.layers.Input(shape=[None], dtype=tf.int64, ragged=True)
is 5-10x slower thantf.keras.layers.Input(shape=[None], dtype=tf.int64, ragged=False)
Describe the expected behavior
The above should not impact performance
Standalone code to reproduce the issue
https://colab.research.google.com/drive/10ZXvdbp1lf8X2LLtemcHr2rX692n2jv9?usp=sharing
Other info / logs
The above is achieved with a custom model implementation. However, when I used the model from one of the Tensorflow tutorials I could not replicate the issue.
On top of that, we were able to replicate this issue with tensorflow serving where loading of the saved_model + first prediction was 5-10x slower than model without ragged tensors.
The text was updated successfully, but these errors were encountered: