Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
4cdea1cc
"git@developer.sourcefind.cn:zhaoyu6/sglang.git" did not exist on "03c039c48ee350bb7513584bfe23fd58bd016a7e"
Commit
4cdea1cc
authored
Dec 27, 2018
by
Taylor Robie
Browse files
skip bisection when it is not needed
parent
d569b531
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
official/recommendation/data_pipeline.py
official/recommendation/data_pipeline.py
+4
-0
No files found.
official/recommendation/data_pipeline.py
View file @
4cdea1cc
...
...
@@ -826,6 +826,10 @@ class BisectionDataConstructor(BaseDataConstructor):
(
neg_item_choice
-
self
.
_total_negatives
[
right_index
])
)[
use_shortcut
]
if
np
.
all
(
use_shortcut
):
# The bisection code is ill-posed when there are no elements.
return
output
not_use_shortcut
=
np
.
logical_not
(
use_shortcut
)
left_index
=
left_index
[
not_use_shortcut
]
right_index
=
right_index
[
not_use_shortcut
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment