You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
지금 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
에러가 나옵니다. 혹시 해결방안이 있을까요?
The text was updated successfully, but these errors were encountered:
안녕하세요?
지금 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
에러가 나옵니다. 혹시 해결방안이 있을까요?
The text was updated successfully, but these errors were encountered: