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
Traceback (most recent call last):
File "D:/PycharmProjects/github/main.py", line 83, in
train(data)
File "D:/PycharmProjects/github/main.py", line 38, in train
loss = model.neg_log_likelihood_loss(*model_input)
File "D:\PycharmProjects\github\model\model.py", line 17, in neg_log_likelihood_loss
outs = self.lstm.get_output_score(*args)
File "D:\PycharmProjects\github\model\model.py", line 55, in get_output_score
lstm_out = self.get_lstm_features(*args)
File "D:\PycharmProjects\github\model\model.py", line 45, in get_lstm_features
pos_lstm_out = self.posBiLSTM.get_lstm_features(tag_inputs, seq_lengths)
File "D:\PycharmProjects\github\model\model.py", line 80, in get_lstm_features
pos_embs = self.pos_embeddings(pos_inputs)
File "H:\Anaconda3\envs\pytorch_cpu\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "H:\Anaconda3\envs\pytorch_cpu\lib\site-packages\torch\nn\modules\sparse.py", line 114, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "H:\Anaconda3\envs\pytorch_cpu\lib\site-packages\torch\nn\functional.py", line 1467, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: index out of range: Tried to access index 46 out of table with 15 rows. at C:\w\1\s\windows\pytorch\aten\src\TH/generic/THTensorEvenMoreMath.cpp:237
The text was updated successfully, but these errors were encountered:
作者您好,我在训练的时候用了自己的数据集,然后程序报了下面这样的错。我找了很久但还是不知道问题出在哪里,不知您是否可以回答,谢谢。
Traceback (most recent call last):
File "D:/PycharmProjects/github/main.py", line 83, in
train(data)
File "D:/PycharmProjects/github/main.py", line 38, in train
loss = model.neg_log_likelihood_loss(*model_input)
File "D:\PycharmProjects\github\model\model.py", line 17, in neg_log_likelihood_loss
outs = self.lstm.get_output_score(*args)
File "D:\PycharmProjects\github\model\model.py", line 55, in get_output_score
lstm_out = self.get_lstm_features(*args)
File "D:\PycharmProjects\github\model\model.py", line 45, in get_lstm_features
pos_lstm_out = self.posBiLSTM.get_lstm_features(tag_inputs, seq_lengths)
File "D:\PycharmProjects\github\model\model.py", line 80, in get_lstm_features
pos_embs = self.pos_embeddings(pos_inputs)
File "H:\Anaconda3\envs\pytorch_cpu\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "H:\Anaconda3\envs\pytorch_cpu\lib\site-packages\torch\nn\modules\sparse.py", line 114, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "H:\Anaconda3\envs\pytorch_cpu\lib\site-packages\torch\nn\functional.py", line 1467, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: index out of range: Tried to access index 46 out of table with 15 rows. at C:\w\1\s\windows\pytorch\aten\src\TH/generic/THTensorEvenMoreMath.cpp:237
The text was updated successfully, but these errors were encountered: