-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
Fix hitrate #1159
Merged
Merged
Fix hitrate #1159
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Added Additive-margin softmax * update changelog.md
* readme * batch overfit fix for reproducibility * batch overfit fix for reproducibility * readme * readme update * extra Config/Hydra API fixes * codestyle
* updated dl_cpu * Updated-requirements-ml.txt * corrected the mistake * Update dl_cpu.yml * Update requirements-ml.txt * Kept dl_cpu 20.04-3.6 minimal as requested * Corrected the mistakes * Add requirements parameter * Update dl_cpu.yml * Update dl_cpu.yml Co-authored-by: Sergey Kolesnikov <scitator@gmail.com>
* verbose * Utils callbacks (catalyst-team#1127) * quantization.py * onnx and quantization * tracing.py * docs * fix * fix * quantization test * fix test * fix comments * fix comments * Update catalyst/callbacks/__init__.py Co-authored-by: Sergey Kolesnikov <scitator@gmail.com> * tests * tests * tests * tests * tests * pycharm tricks * extra tests * Utils callbacks (catalyst-team#1145) * quantization.py * onnx and quantization * tracing.py * docs * fix * fix * quantization test * fix test * fix comments * fix comments * quantization example * examples * CHANGELOG.md * fix * fix * Apply suggestions from code review Co-authored-by: Sergey Kolesnikov <scitator@gmail.com> * extra tests 2 * extra tests 2 * extra tests 2 * extra tests 2 * extra tests 2 * extra tests 2 * extra tests 2 * extra tests 2 Co-authored-by: Nikita Balagansky <37884009+elephantmipt@users.noreply.github.com>
* typings & few docs * typing fix; disabled `dist.barrier()` in optimizer step for ddp * docs * docs: fixed long lines with docs * docs fixes * optimizer args * removed empty line Co-authored-by: Dmytro Doroshenko <dimdoroshenko@gmail.com>
* minimal version fix * docs
* fix * fix
* changes for NiftiReader * adding import statement that was needed and fixing codestyle * updated CHANGELOG * removing unnecesary documentation * fixing codestyle * updated docs and requirements * adding a space * not importing nibabel for docs * fixing typo * adding step for contrib pip caching * fixed codestyle and added a test for reader that uncovered a mistake :) * hopefully fixing imports * adding sergey suggested fix * fixing deploy_push.yml * updating workflows Co-authored-by: Kevin Wang <kevin.wang@affectiva.com> Co-authored-by: Kevin Wang <kcwang26@gsu.edu>
@Scitator LGTM |
Scitator
previously requested changes
Apr 5, 2021
@@ -39,7 +40,10 @@ def hitrate(outputs: torch.Tensor, targets: torch.Tensor, topk: List[int]) -> Li | |||
targets_sort_by_outputs = process_recsys_components(outputs, targets) | |||
for k in topk: | |||
k = min(outputs.size(1), k) | |||
hits_score = torch.sum(targets_sort_by_outputs[:, :k], dim=1) / k | |||
if targets.sum(dim=1).data[0] != 0: |
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.
not sure if this is correct
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before submitting (checklist)
catalyst-make-codestyle && catalyst-check-codestyle
(pip install -U catalyst-codestyle
).make check-docs
?pytest .
?latest
andminimal
requirements?Description
Related Issue
#1155
Type of Change
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
PS