Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Elmo' object has no attribute 'batch_to_embeddings' #10

Open
TianhaoFu opened this issue Aug 10, 2023 · 0 comments
Open

Comments

@TianhaoFu
Copy link

File "main.py", line 50, in response_pred
json_list = durationAPI.pred(events)
File "../Duration/inference_api.py", line 84, in pred
outputs = compute_predictions(self.model, test_loader)
File "/home/tianhao/anaconda3/envs/event-pipeline/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 49, in decorate_no_grad
return func(*args, **kwargs)
File "../Duration/utils_duration.py", line 40, in compute_predictions
p1_dur, p2_dur, fine, rel = model(words, span, root)
File "/home/tianhao/anaconda3/envs/event-pipeline/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/tianhao/relation_extraction/EventPlus/component/Duration/scripts/src/factslab/factslab/pytorch/temporalmodule.py", line 241, in forward
inputs, masks = self.elmo_class.batch_to_embeddings(structures)
File "/home/tianhao/anaconda3/envs/event-pipeline/lib/python3.7/site-packages/torch/nn/modules/module.py", line 576, in getattr
type(self).name, name))
AttributeError: 'Elmo' object has no attribute 'batch_to_embeddings'

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

No branches or pull requests

1 participant