How to load tfhub module


I have been having trouble loading a tfhub model (ELMo), even when I try to call a locally downloaded version. Here’s the error message:

TypeError : ‘module’ object is not callable

File “/usr/local/lib/python3.6/dist-packages/streamlit/”, line 310, in _run_script exec(code, module.dict)

File “/storage/notebooks/tim/”, line 55, in elmo = hub.module(’/storage/notebooks/tim/tfhub’, trainable=True)

Any suggestions?


this is the error messag in my terminal: CUDA error: out of memory

Hi @thambidge,

Would you be willing to post more of your code, at least the parts that perform the module imports and the usage of your TFhub model?