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

Problem in Viterbi algorithm #71

Closed
mrluin opened this issue Nov 4, 2019 · 2 comments
Closed

Problem in Viterbi algorithm #71

mrluin opened this issue Nov 4, 2019 · 2 comments

Comments

@mrluin
Copy link

mrluin commented Nov 4, 2019

Hi,

Thanks for your works!
But I have some question about Viterbi Algorithm in decoding_formulas.py

I think the shape of self.network_space is [layers, scales, choices], that is layers, samples, and rates in the for loops, right?
If so, should be code in line 50 is

if (sample == 0 and  rate == 0) or (sample == 3 and rate == 2):
    continue

because the corresponding choices of rate 0, 1, 2 are ↗, →, and ↘.
If I am wrong, could you give me some hints and further explanations?
Thanks in advance.

Best regards,
TTB

@zhizhangxian
Copy link
Collaborator

Yes, you are right. Thanks very much ! :)

@zhizhangxian
Copy link
Collaborator

Sorry, I din't check the code before and make a mistake
sample == 3 rate == 0 denotes the information flow will come from the sample==4 in previous layer, it is wrong, and same as sample == 0 rate == 0
So it shold be

if (sample == 0 and  rate == 2) or (sample == 3 and rate == 0):
    continue

Thanks :)

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