Punctuation-Restoration
Punctuation-Restoration copied to clipboard
TF 2 migration - lazy loader issue
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.