Closed
Conversation
96ba397 to
9670e4f
Compare
Member
Author
|
Is there any way I can get to the details of the Travis build error? My EDIT: this is not the only PR to fail for this reason. #5595 resulted in a similar line, #5558 as well, same with the current state of #5676 (log). |
Member
Author
|
I guess I force-pushed too much and broke Travis. Going to close this and open a new PR. |
This file contains hidden or 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
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.
Note: sorry about potential confusion arising from multiple edits to this PR. It is complete now, unless someone finds room for more improvement.
Motivation: accuracy calculation, particularly for segmentation tasks with
top_k: 1, can be extremely slow: note the two nested for loops (over the batch and over image pixels) withpartial_sortinside. The main culprit here is the need to copy all data to a new container so we can sort it.My proposal is to replace that with a dynamically updated
priority_queue: instead of copying everything and thinking later, we can iterate just once and only copy an element when it's larger than the smallest ofkcurrently best ones (provided by an automatically sorted container).Initially I thought of having a separate case for
top_k: 1, where we would only make a single iteration and remember the single best element, but it is only marginally faster than the queue approach (see below), therefore I abandoned the idea for the sake of code clarity.Benchmark settings:
max_iter: 14640,test_interval: 1464,test_iter: 1449,Each build was ran 4 times (Titan Z can run two nets in parallel so it was effectively 2 times 2 runs), times were measured from job initialization to completion (as reported by DIGITS).
Results:
For me this is about 10% faster for top-5 accuracy, and over 30% faster for top-1.
Task list:
top_k==1case