Open Chenjm08 opened 1 year ago
要么换torch版本,要么把lengths改成lengths.cpu()
要么换torch版本,要么把lengths改成lengths.cpu()
torch为最新版本,lengths.to(opt.device)改了之后会触发另一个runtime error
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper_CUDA__index_select)
do you have any solutions to solve the problem?
do you have any solutions to solve the problem?
model.py
Line 51 packed = torch.nn.utils.rnn.pack_padded_sequence(embedded, input_lengths)
just edited packed = torch.nn.utils.rnn.pack_padded_sequence(embedded, input_lengths.cpu())
do you have any solutions to solve the problem?
model.py Line 51
packed = torch.nn.utils.rnn.pack_padded_sequence(embedded, input_lengths)
just editedpacked = torch.nn.utils.rnn.pack_padded_sequence(embedded, input_lengths.cpu())
Woo, haven't check it but thank you!
我运行main.py之后没有进入对话模式, 出现os: <module 'os' from '地址' preprocess: <function preprocess at 0x000001C8EE6B57B8> train_eval: <module 'train_eval' from'地址' fire: <module 'fire' from'地址' QA_test: <module 'QA_data.QA_test' from'地址' Config: <class 'config.Config'> chat: <function chat at 0x000001C8EDFA2EA0> 求解决
运行以下命令,出现崩溃,该怎么解决?
崩溃信息: