Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_strategy_cvr
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
gm_strategy_cvr
Commits
369d99a3
Commit
369d99a3
authored
Jul 22, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get result
parent
82e9c33c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
model.py
src/models/esmm/model.py
+5
-2
No files found.
src/models/esmm/model.py
View file @
369d99a3
...
...
@@ -129,8 +129,11 @@ def model_predict_diary(device_id, diary_ids, device_dict, diary_dict, predict_f
time_1
=
timeit
.
default_timer
()
predictions
=
predict_fn
({
"examples"
:
examples
})
res
=
sorted
(
zip
(
diary_ids_res
,
predictions
[
"output"
]
.
tolist
()),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
res_tuple
=
sorted
(
zip
(
diary_ids_res
,
predictions
[
"output"
]
.
tolist
()),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
res
=
[]
for
(
id
,
_
)
in
res_tuple
:
res
.
append
(
id
)
print
(
res
)
total_1
=
(
timeit
.
default_timer
()
-
time_1
)
print
(
"prediction cost {:.5f}s"
.
format
(
total_1
))
return
prediction
s
return
re
s
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