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

对于CTC代码中fvars和bvars的计算问题 #14

Closed
chengzhanzhan opened this issue Jun 17, 2016 · 4 comments
Closed

对于CTC代码中fvars和bvars的计算问题 #14

chengzhanzhan opened this issue Jun 17, 2016 · 4 comments

Comments

@chengzhanzhan
Copy link

chengzhanzhan commented Jun 17, 2016

假设给定logsoftmax如下:
softmax

在CTC代码中计算fvars时:
fvars.at({0, 0}) = input_i.at({0, 0}); if (nSegment > 1) { fvars.at({0, 1}) = input_i.at({0, targetData_i[0]}); }
在使用您的代码计算时,输出:
torch_alpha

而按照代码理解,我认为输出应该为:
caffe_alpha

我所不明白的是:
1)为何计算出的fvars({0,0})和fvars({0,1})为0?

非常感谢。

@chengzhanzhan
Copy link
Author

虽不知为何,但已解决。

@bgshih
Copy link
Owner

bgshih commented Jun 20, 2016

@chengzhanzhan This looks weird, as fvars{0,0} and fvars{0,1} are not assigned elsewhere. Could this be a problem on the printing?

@chengzhanzhan
Copy link
Author

I attempted to print them in C++ code, and I can see that the results is correct; but when I printed results by using the returned fblualib::luaPushTensor(L, alpha), fvars({0,0}) == 0.000.

@bgshih
Copy link
Owner

bgshih commented Jun 20, 2016

@chengzhanzhan I could not identify the problem at this moment. But as CTC works correctly, I will just leave it there for now.

@bgshih bgshih closed this as completed Jun 20, 2016
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

2 participants