Closed IavTavares closed 3 years ago
Also, the problem doesn't seem to be from TensorFlow-Hub, since when I run
import tensorflow_hub as hub
model = hub.KerasLayer("https://tfhub.dev/google/nnlm-en-dim128/2")
embeddings = model(["The rain in Spain.", "falls",
"mainly", "In the plain!"])
print(embeddings.shape) #(4,128)
Everything runs smoothly, and I get the desired output.
@IavTavares Could you please refer to the similar issues link1, link2 ,Please have a look at the common issues and let us know if it helps?Thank you!
I tried one of the answers in link1.
I downloaded the preprocessing model, and redirected the hub.load() statement to the model's directory.
I also had to do something similar for the encoder.
@IavTavares Thank you for the update! Could you please let us know if this issue is resolved ? Thanks!
Well... it depends on what you mean by resolved. If you mean did I find a workaround? Yes. If the underlying issue was solved? No.
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: @.> Sent: 22 October 2021 04:49 To: @.> Cc: @.>; @.> Subject: Re: [tensorflow/tensorflow] Saved Model doesn't exist error, when trying to use TensorFlow Hub (Issue tensorflow/tensorflow#52606)
@IavTavareshttps://github.com/IavTavares Thank you for the update! Could you please let us know if this issue is resolved ? Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/tensorflow/tensorflow/issues/52606#issuecomment-949262894, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AV4NS6PS7RCEXJ6FSSVQHATUIDNLJANCNFSM5GNNZ5ZQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@IavTavares,
Are you getting this error only when loading the model small_bert/bert_en_uncased_L-4_H-512_A-8
? Can you try using ert_model_name = small_bert/bert_en_uncased_L-2_H-128_A-2
and let us know if you're getting the same error for that one as well? Thanks!
If I run
tfhub_handle_preprocess="https://tfhub.dev/tensorflow/bert_en_uncased_preprocess/3"
bert_preprocess_model = hub.KerasLayer(tfhub_handle_preprocess)
tfhub_handle_encoder="https://tfhub.dev/tensorflow/small_bert/bert_en_uncased_L-12_H-128_A-2/2"
bert_model = hub.KerasLayer(tfhub_handle_encoder)
Then I get the same error. However, if I point tfhub_handle_preprocess to a directory with the preprocess already downloaded, then everything works fine.
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: @.> Sent: 22 October 2021 16:22 To: @.> Cc: @.>; @.> Subject: Re: [tensorflow/hub] Saved Model doesn't exist error, when trying to use TensorFlow Hub (Issue #816)
@IavTavareshttps://github.com/IavTavares,
Are you getting this error only when loading the model small_bert/bert_en_uncased_L-4_H-512_A-8? Can you try using ert_model_name = small_bert/bert_en_uncased_L-2_H-128_A-2 and let us know if you're getting the same error for that one as well? Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/tensorflow/hub/issues/816#issuecomment-949729614, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AV4NS6JYBDWEQKGNQ5EEAT3UIF6R5ANCNFSM5GQVNJ2A. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@IavTavares
Can you try providing a custom directory for TFHUB_CACHE_DIR
and let us know if the issue still persists? You can refer this link
@IavTavares
Closing this issue due to inactivity.Please feel free to reopen if this issue still persists.Thanks
System information -Windows 10
Describe the problem I'm trying to follow tensorflow's tutorial on how to classify text with the BERT model. However, using their notebook, I encounter a error message telling me that the model I saved does not exist.
Provide the exact sequence of commands / steps that you executed before running into the problem
I run the notebook I downloaded above. Everything goes well, until I run the following: bert_preprocess_model = hub.KerasLayer(tfhub_handle_preprocess)
Any other info / logs
OSError Traceback (most recent call last)