-
Notifications
You must be signed in to change notification settings - Fork 15
xvector: Objf and Deriv #6
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
Conversation
…. Improving unit tests. Adding CPU version of objf calculation
if (i + 1 == j && i % 2 == 0) { | ||
obfj_terms[scores_index] = log(1.0 + exp(-L)); | ||
obfj_derivs[scores_index] = 1.0 / (1.0 + exp(L)); | ||
} else if (i != j) { | ||
} else if (i < j) { | ||
obfj_terms[scores_index] = K * log(1.0 + exp(L)); | ||
obfj_derivs[scores_index] = -K / (1.0 + exp(-L)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I were you I'd do at this point
else {
objf_terms[scores_index] = 0.0;
objf_derivs[scores_index] = 0.0;
}
this will save you from having to initialize those to zero (i.e. you can size them with kUndefined)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please don't assume that the stride of objf_deriv is the same as that of objf. It's against the interface.
* OCR: Add IAM corpus with unk decoding support (#3) * Add a new English OCR database 'UW3' * Some minor fixes re IAM corpus * Fix an issue in IAM chain recipes + add a new recipe (#6) * Some fixes based on the pull request review * Various fixes + cleaning on IAM * Fix LM estimation and add extended dictionary + other minor fixes * Add README for IAM * Add output filter for scoring * Fix a bug RE switch to pyhton3 * Add updated results + minor fixes * Remove unk decoding -- gives almost no gain * Add UW3 OCR database * Fix cmd.sh in IAM + fix usages of train/decode_cmd in chain recipes * Various minor fixes on UW3 * Rename iam/s5 to iam/v1 * Add README file for UW3 * Various cosmetic fixes on UW3 scripts * Minor fixes in IAM
* OCR: Add IAM corpus with unk decoding support (#3) * Add a new English OCR database 'UW3' * Some minor fixes re IAM corpus * Fix an issue in IAM chain recipes + add a new recipe (#6) * Some fixes based on the pull request review * Various fixes + cleaning on IAM * Fix LM estimation and add extended dictionary + other minor fixes * Add README for IAM * Add output filter for scoring * Fix a bug RE switch to pyhton3 * Add updated results + minor fixes * Remove unk decoding -- gives almost no gain * Add UW3 OCR database * Fix cmd.sh in IAM + fix usages of train/decode_cmd in chain recipes * Various minor fixes on UW3 * Rename iam/s5 to iam/v1 * Add README file for UW3 * Various cosmetic fixes on UW3 scripts * Minor fixes in IAM
Finished cuda-enabled version of objf and deriv calculation.
Improving unit tests.
Added CPU version of objf calculation.