I have the following problem mainly due to my lack of expertise with TF in general and TF2.0 in particular.
I try to use Elmo embedding with a keras LSTM implementation.
The code that I am inspired from is using the TF-Hub Elmo module. Which appears to be quite difficult to use if I want to write a 100% TF2.0 Python code.
This is what I have done :
- I have create the following ElmoEmbedding class but already I am facing the issue on Colab of the eager mode. May I could disable it or should I include the hub.Module call into as default Graph as proposed in the TF2.0 migration documentation ?
- Now, I have created a tf.function, as I have read that it is the TF2.0 way equivalent to Session.run(). The main question for me, despite the autograph parameter is set to TRUE by default, is how the graph will be passed to the Elmo TF-Hub module...?
The last call is producting the following error: