[英]How to train my ChatterBot model using GPU instead of CPU
I am using chatterbot library to develop a chatbot.我正在使用 chatterbot 库来开发聊天机器人。 I want to train the chatbot using my GPU instead of my CPU
我想使用我的 GPU 而不是我的 CPU 来训练聊天机器人
Here is my code:这是我的代码:
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
bot = ChatBot(
#Bot name
"Elon"
)
trainer = ChatterBotCorpusTrainer(bot)
trainer.train(
'chatterbot.corpus.english'
)
while True:
user_input = input('You: ')
bot_response = bot.get_response(user_input)
print(bot_response)
Looking at chatterbot's documentation, there is nothing mentioned about that.查看chatterbot的文档,没有提到这一点。 But maybe you can look at the framework that it was built on and try to change the sourcecode to allow GPU training.
但也许您可以查看它所构建的框架并尝试更改源代码以允许 GPU 训练。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.