Skip to content
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

TF 2 migration - lazy loader issue #2

Open
Jeff-Winchell opened this issue Jun 30, 2023 · 0 comments
Open

TF 2 migration - lazy loader issue #2

Jeff-Winchell opened this issue Jun 30, 2023 · 0 comments

Comments

@Jeff-Winchell
Copy link

Punctuation_Restoration_Model's _build_embedding_op method generates an error when run under tensorflow 2 (after migrating all changed class locations between TF1 and 2 (usually inserting compat.v1. into the path of the class))

---> 52 word_emb_1 = tf.compat.v1.layers(np.load(self.cfg["pretrained_emb"])["embeddings"], name="word_emb_1",
53 dtype=tf.float32, trainable=self.cfg["tuning_emb"])

 TypeError: 'LazyLoader' object is not callable
 
 I do not know how lazyloader is being called by the above code. So I can't figure out what code likely needs a similar change of inserting .compat.v1. into the path of some reference to a class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant