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

Can't run test.py #8

Open
gitUserGoodLeaner opened this issue Apr 14, 2020 · 0 comments
Open

Can't run test.py #8

gitUserGoodLeaner opened this issue Apr 14, 2020 · 0 comments

Comments

@gitUserGoodLeaner
Copy link

gitUserGoodLeaner commented Apr 14, 2020

@liuhu-bigeye Can't run test script, the error output like this:
I0414 09:26:43.509974 98 seg_ctc_ent_log_fb.py:171] alphas.size():torch.Size([1, 20, 12])
I0414 09:26:43.510052 98 seg_ctc_ent_log_fb.py:172] alphas[:-1].size():torch.Size([0, 20, 12])
I0414 09:26:43.510107 98 seg_ctc_ent_log_fb.py:173] alphas_in.size():torch.Size([0, 69])
I0414 09:26:43.510155 98 seg_ctc_ent_log_fb.py:174] pred_blank_in.size():torch.Size([19, 69])
I0414 09:26:43.510199 98 seg_ctc_ent_log_fb.py:175] betas_in.size():torch.Size([19, 69])
I0414 09:26:43.515330 98 seg_ctc_ent_log_fb.py:171] alphas.size():torch.Size([1, 20, 12])
I0414 09:26:43.515409 98 seg_ctc_ent_log_fb.py:172] alphas[:-1].size():torch.Size([0, 20, 12])
I0414 09:26:43.515462 98 seg_ctc_ent_log_fb.py:173] alphas_in.size():torch.Size([0, 69])
I0414 09:26:43.515514 98 seg_ctc_ent_log_fb.py:174] pred_blank_in.size():torch.Size([20, 69])
I0414 09:26:43.515559 98 seg_ctc_ent_log_fb.py:175] betas_in.size():torch.Size([20, 69])
I0414 09:26:43.520695 98 seg_ctc_ent_log_fb.py:171] alphas.size():torch.Size([1, 20, 12])
I0414 09:26:43.520773 98 seg_ctc_ent_log_fb.py:172] alphas[:-1].size():torch.Size([0, 20, 12])
I0414 09:26:43.520830 98 seg_ctc_ent_log_fb.py:173] alphas_in.size():torch.Size([0, 69])
I0414 09:26:43.520878 98 seg_ctc_ent_log_fb.py:174] pred_blank_in.size():torch.Size([21, 69])
I0414 09:26:43.520923 98 seg_ctc_ent_log_fb.py:175] betas_in.size():torch.Size([21, 69])
I0414 09:26:43.526067 98 seg_ctc_ent_log_fb.py:171] alphas.size():torch.Size([1, 20, 12])
I0414 09:26:43.526146 98 seg_ctc_ent_log_fb.py:172] alphas[:-1].size():torch.Size([0, 20, 12])
I0414 09:26:43.526200 98 seg_ctc_ent_log_fb.py:173] alphas_in.size():torch.Size([0, 69])
I0414 09:26:43.526250 98 seg_ctc_ent_log_fb.py:174] pred_blank_in.size():torch.Size([22, 69])
I0414 09:26:43.526310 98 seg_ctc_ent_log_fb.py:175] betas_in.size():torch.Size([22, 69])
I0414 09:26:43.531480 98 seg_ctc_ent_log_fb.py:171] alphas.size():torch.Size([1, 20, 12])
I0414 09:26:43.531559 98 seg_ctc_ent_log_fb.py:172] alphas[:-1].size():torch.Size([0, 20, 12])
I0414 09:26:43.531629 98 seg_ctc_ent_log_fb.py:173] alphas_in.size():torch.Size([0, 69])
I0414 09:26:43.531694 98 seg_ctc_ent_log_fb.py:174] pred_blank_in.size():torch.Size([23, 69])
I0414 09:26:43.531757 98 seg_ctc_ent_log_fb.py:175] betas_in.size():torch.Size([23, 69])
I0414 09:26:43.536949 98 seg_ctc_ent_log_fb.py:171] alphas.size():torch.Size([1, 20, 12])
I0414 09:26:43.537029 98 seg_ctc_ent_log_fb.py:172] alphas[:-1].size():torch.Size([0, 20, 12])
I0414 09:26:43.537085 98 seg_ctc_ent_log_fb.py:173] alphas_in.size():torch.Size([0, 69])
I0414 09:26:43.537133 98 seg_ctc_ent_log_fb.py:174] pred_blank_in.size():torch.Size([24, 69])
I0414 09:26:43.537179 98 seg_ctc_ent_log_fb.py:175] betas_in.size():torch.Size([24, 69])
Traceback (most recent call last):
File "pytorch_ctc/seg_ctc_ent_log_fb.py", line 219, in
test_seg_ctc(use_mine=True)
File "pytorch_ctc/seg_ctc_ent_log_fb.py", line 90, in test_seg_ctc
cost.backward()
File "/usr/local/lib/python3.6/site-packages/torch/tensor.py", line 118, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/usr/local/lib/python3.6/site-packages/torch/autograd/init.py", line 93, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

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

1 participant