Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Potential bugs in model.cpp? #294

Open
rahultripathi007 opened this issue Jul 15, 2020 · 0 comments
Open

Potential bugs in model.cpp? #294

rahultripathi007 opened this issue Jul 15, 2020 · 0 comments

Comments

@rahultripathi007
Copy link

model.cpp

  • L254: if ((i % kDecrStep) == (kDecrStep - 1)) {
    • since i is a randomly chosen index (as in L211: auto i = *ip;), isn't decrementing rate in L255 based on this condition error-prone?
    • Furthermore, since "rate" is a shared variable across threads, shouldn't this be protected by a locking mechanism to avoid race condition.
  • L448: loss[i] /= negSearchLimit;
    • shouldn't this be: loss[i] /= num_negs[i] since only num_negs[i] are accounted for in updating loss[i]. Or, perhaps loss[i] /= j since we may do an early break in L441.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant