Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

please slove this prolem #3133

Closed
Pydataman opened this issue Aug 10, 2019 · 1 comment
Closed

please slove this prolem #3133

Pydataman opened this issue Aug 10, 2019 · 1 comment

Comments

@Pydataman
Copy link

when I train chinese elmo, remove below parameters
'char_cnn': {'activation': 'relu',
'embedding': {'dim': 16},
'filters': [[1, 32],
[2, 32],
......
]
'max_characters_per_token': 50,
'n_characters': 261,
'n_highway': 2},
I run
from allennlp.modules.elmo import Elmo, batch_to_ids
elmo = Elmo(options_file, weight_file, 1, dropout=0)
character_ids = batch_to_ids(sentences)
embeddings = elmo(character_ids)

error:
KeyError: "Unable to open object (object 'char_embed' doesn't exist)"

is the same as #1521

@DeNeutoy
Copy link
Contributor

Hi! Currently we only support full elmo models with character embeddings. Please see #1521 for a hacky solution, but we won't be adding this to the library. Good luck!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants