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

Potential bugs in model.cpp? #294

@rahultripathi007

Description

@rahultripathi007

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions