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

챗봇 실행에 관련하여 문의드립니다. #18

Open
ryanh9801 opened this issue Feb 20, 2021 · 0 comments
Open

챗봇 실행에 관련하여 문의드립니다. #18

ryanh9801 opened this issue Feb 20, 2021 · 0 comments

Comments

@ryanh9801
Copy link

안녕하세요?

지금 KoBert 으로 하는 학습은 다해서 챗봇 부분을 실행해보고자 example/kobert-wellness-qa.py
를 실행해보았는데 Question 부분까지는 나오는데 질문을 작성하면

Question: 요즘 기분이 우울한 느낌이에요
Traceback (most recent call last):
File "C:/Users/users/PycharmProjects/pythonProject1/Chatbot/example/kobert-wellness-qa.py", line 62, in
output = model(**data)
File "C:\Users\users\Anaconda\envs\pythonProject1\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\users\PycharmProjects\pythonProject1\Chatbot\example\kobert.py", line 58, in forward
inputs_embeds=inputs_embeds,
File "C:\Users\users\Anaconda\envs\pythonProject1\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\users\Anaconda\envs\pythonProject1\lib\site-packages\transformers\modeling_bert.py", line 753, in forward
input_ids=input_ids, position_ids=position_ids, token_type_ids=token_type_ids, inputs_embeds=inputs_embeds
File "C:\Users\users\Anaconda\envs\pythonProject1\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\users\Anaconda\envs\pythonProject1\lib\site-packages\transformers\modeling_bert.py", line 178, in forward
inputs_embeds = self.word_embeddings(input_ids)
File "C:\Users\users\Anaconda\envs\pythonProject1\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\users\Anaconda\envs\pythonProject1\lib\site-packages\torch\nn\modules\sparse.py", line 126, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "C:\Users\users\Anaconda\envs\pythonProject1\lib\site-packages\torch\nn\functional.py", line 1852, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Input, output and indices must be on the current device

Process finished with exit code 1

에러가 나옵니다. 혹시 해결방안이 있을까요?

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