-
Notifications
You must be signed in to change notification settings - Fork 74k
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
WARNING:absl:Found untraced functions such as lstm_cell_2_layer_call_fn, lstm_cell_2_layer_call_and_return_conditional_losses, lstm_cell_2_layer_call_fn, lstm_cell_2_layer_call_and_return_conditional_losses, lstm_cell_2_layer_call_and_return_conditional_losses while saving (showing 5 of 5). These functions will not be directly callable after loading. #47554
Comments
version: reproduce: import tensorflow as tf
from tensorflow import keras as ks
model = ks.Sequential([
ks.layers.LSTM(units=1, input_shape=(5, 1))
])
model.compile(optimizer='adam', loss='mse', metrics=['mae'])
model.save('models/test') |
@GF-Huang |
Not help. |
@GF-Huang |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you. |
Hello, I have the same issue in tf.2.4.1 si do not close it |
@ClementViricel |
@Saduf2019 |
I am able to replicate the issue reported on tf 2.3,tf 2.4 nightly, please find the gist here. |
Still happening with tf2.4.1 |
This issue still persists in |
Exact same issue for me, with a model using LSTM layers as well. Super frustrating that basic functionality like this does not work. |
Hi, I still have the same issue with |
I still get the same issue, I'm amazed how long this issue is and it has still not been solved. I also tried saving the model in h5 format, but I get the following error then:
|
I'm also getting the issue. Not sure if it has any affect on anything. Can I just ignore it? I noticed PatternFinder above says that it causes the model to slow to a crawl if loaded. Is that true? |
Also getting this issue. I switched from h5 format to tf format because the docs (and the actual observed behavior) suggest that training weights aren't properly saved in h5 format. I get a significant increase in loss at the start of training after reloading from an h5 file. Using CPU (because it's faster than GPU for this net). Structure is:
The warning is:
And then:
repeated 24 times. The model does actually reload correctly. The performance is not worse (although it was stunningly awful in the first place). Also notable: the model runs with GPU disabled because CPU-only is faster for this model. However, it does introduce an additional substantial memory leak in addition to the huge memory leak that LTSM units appear to already have. (About 10% of total memory per save). My model now runs out of memory after 2 epochs instead of 3. lol. Who the heck is bersbersbers, and why has he downvoted every report of a problem in this thread? |
Having the same issue, can save in h5 format, however tf still not supported |
I'm facing the issue too, can I assume my model will still works correctly ? I intend to convert it to TFLite format to run on ESP32 device ... |
I have the same Warning when saving and can confirm the model still works as normal when doing inference |
thank you @AidanDugganCIT |
'tf' format saved model worked and no warning in tf version==2.7.0 before, but have same warning issue in 2.9.0 and colab. The saved model does can works normally. |
i have the same problem in tf2.10, but change
|
Hi @GF-Huang , The warnings that you are getting can be safely ignored.AFAIK It should not be problem if the saved model reloads without error.Please find the attached gist where reloading does not change Model architecture or Parameters. You can also find such warning in Tensorflow text Tutorial which are safely ignored.You can refer groups.google and SO also which supports Ignoring this warning. And yes you will not get this warning in If you want to suppress warnings you can use the below code.
|
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you. |
Closing as stale. Please reopen if you'd like to work on this further. |
I am getting the following warning and it is unclear how to address it. Looking here, I do not see a good resolution so just sharing.
|
I have the same problem
|
I also have the similar problem . If any one have found the solution please share that. WARNING:absl:Found untraced functions such as _jit_compiled_convolution_op, _jit_compiled_convolution_op, _jit_compiled_convolution_op, _jit_compiled_convolution_op, dropout_33_layer_call_fn while saving (showing 5 of 10). These functions will not be directly callable after loading. INFO:tensorflow:Assets written to: ./saved_model_VIX\assets |
this error is still present in tf 2.10, 2.11 and 2.12 |
I had the similar problem when I tried to save the model with model.save("filename"). There were warnings. I couldn't load the model either. When I save the model with model.save("filename.keras"), everything is fine. |
Same here. I also realized that I have the problem when using tensorflow 2.12, but not with tensorflow 2.10 |
@MbProg Thanks for the information. The interesting thing is that my Tensorflow is 2.10.0, which seems to be the highest version currently supported by (Ana)Conda. |
Still problem with TF version 2.14.0. When I learn deep learning model in Ubuntu WSL, 'h5' format is fine for saving and learning. However, they said it as legacy so I tried 'keras' format. Then, it made error so I tried 'tf' format. It is fine for learning but it is super slow for learning. Every epoch, it makes error as "INFO:tensorflow:Assets written to: DeeplabV3Plus.tf/assets". Therefore, I have to use 'h5' format again. As shown above, it occasionally use Cuda. (But that shows not bad using Cuda (It is almost end of epochs), previously Cuda graphs look like multiple spikes and their distance was far) (Please see below) Taking 1m 50s for 'h5' format and 11m 58s for 'tf' format to learn model. At the end of learning, Cuda shows continuous using but almost entire process, Cuda doesn't fully use itself. |
WARNING:absl:Found untraced functions such as lstm_cell_2_layer_call_fn, lstm_cell_2_layer_call_and_return_conditional_losses, lstm_cell_2_layer_call_fn, lstm_cell_2_layer_call_and_return_conditional_losses, lstm_cell_2_layer_call_and_return_conditional_losses while saving (showing 5 of 5). These functions will not be directly callable after loading.
The text was updated successfully, but these errors were encountered: