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

Off by one? #28

Open
kornelski opened this issue Oct 26, 2020 · 0 comments
Open

Off by one? #28

kornelski opened this issue Oct 26, 2020 · 0 comments

Comments

@kornelski
Copy link
Contributor

kornelski commented Oct 26, 2020

I'm wondering why this code has (feature_id - 1):

for &feature_id in &self.feature_ids[..] {
feature_map.get_feature_vector((feature_id - 1) as usize, dest);
let offset = feature_map.get_feature_vector_dim(feature_id as usize);
dest = dest.offset(offset as isize);
}

shouldn't it advance the pointer by the size of the same feature vector that has been copied, not the next one?

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