Closed acmilannesta closed 4 years ago
@acmilannesta, Can you please let us know the TF Hub Version you are using. Thanks!
I'm using tfhub 0.7.0.
rmothukuru notifications@github.com 于2019年12月16日周一 上午12:37写道:
@acmilannesta https://github.com/acmilannesta, Can you please let us know the TF Hub Version you are using. Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/hub/issues/447?email_source=notifications&email_token=ALL6NUUNKT5JU226PBSFHILQY4HZRA5CNFSM4J256DYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG5SLNI#issuecomment-565913013, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALL6NUQHNOJH35SYEGXRIJ3QY4HZRANCNFSM4J256DYA .
Hi @acmilannesta, you'r using the old hub.Module
class as if if were a Keras Layer type. That's not supported; please review tensorflow.org/hub/migration_tf2 and its links to the new and old APIs.
https://tfhub.dev/google/albert_base/2 comes in the old hub.Module
format. With tensorflow-hub 0.7.0, this can also be used in the new hub.KerasLayer
API, but not with trainable=True
.
I haven't heard back, so I suppose this has been solved.
I used albert_base_v2 and tfhub on python3.6 and tensorflow 1.15.0.
I tried to wrap the albert output layer with a pooling layer. And it gives the following erros:
Here is my code:
Up till now everything runs fine. But when I run the following, it gives the error above.
Also I tried wrap it in tf.Session, but it didn't work:
Any helps are appreciated!