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

运行demo出错 #26

Closed
BaoyanWang opened this issue Aug 20, 2018 · 2 comments
Closed

运行demo出错 #26

BaoyanWang opened this issue Aug 20, 2018 · 2 comments

Comments

@BaoyanWang
Copy link

Epoch: 0/100
Learning rate is setted as: 0.015
Traceback (most recent call last):
File "main.py", line 436, in
train(data, save_model_dir, seg)
File "main.py", line 281, in train
loss, tag_seq = model.neg_log_likelihood_loss(gaz_list, batch_word, batch_biword, batch_wordlen, batch_char, batch_charlen, batch_charrecover, batch_label, mask)
File "/root/receiveData/LatticeLSTM/model/bilstmcrf.py", line 32, in neg_log_likelihood_loss
scores, tag_seq = self.crf._viterbi_decode(outs, mask)
File "/root/receiveData/LatticeLSTM/model/crf.py", line 159, in _viterbi_decode
partition_history = torch.cat(partition_history,0).view(seq_len, batch_size,-1).transpose(1,0).contiguous() ## (batch_size, seq_len. tag_size)
RuntimeError: invalid argument 0: Tensors must have same number of dimensions: got 2 and 3 at /pytorch/torch/lib/THC/generic/THCTensorMath.cu:102

@jiesutd
Copy link
Owner

jiesutd commented Aug 20, 2018

Please confirm you use the PyTorch 0.3.0.

@jiesutd jiesutd closed this as completed Aug 20, 2018
@wangruicn
Copy link

@BaoyanWang 请参考Issue#8

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

3 participants