The pre-trained ELMo models are provided at https://allennlp.org/elmo.
How would I use the files provided?
I think that I have to reconstruct the model from the json file, and then load the weights from .hdf5 file into the model.
But json format doesn't seem to work for keras.models.model_from_json
. I got the error:
ValueError: Improper config format: ...
Using
tensorflow_hub
to load ELMo model, an example:But first import:
You can replace the links with actual files too. Hope it helps