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
587ca35d
Commit
587ca35d
authored
Jul 22, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add logger
parent
14de04d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
main.py
src/main.py
+3
-0
No files found.
src/main.py
View file @
587ca35d
...
...
@@ -21,6 +21,8 @@ from models.esmm.model import esmm_model_fn, model_export, model_predict_diary
def
main
():
time_begin
=
time
.
time
()
tf
.
logging
.
set_verbosity
(
tf
.
logging
.
INFO
)
device_df
,
diary_df
,
click_df
,
conversion_df
=
read_csv_data
(
Path
(
"~/data/cvr_data/"
))
# print(diary_df.sample(1))
device_df
=
device_feature_engineering
(
device_df
)
...
...
@@ -40,6 +42,7 @@ def main():
shutil
.
rmtree
(
model_path
)
model
=
tf
.
estimator
.
Estimator
(
model_fn
=
esmm_model_fn
,
params
=
params
,
model_dir
=
model_path
)
# tf.estimator.train_and_evaluate
model
.
train
(
input_fn
=
lambda
:
esmm_input_fn
(
train_df
,
shuffle
=
True
))
metrics
=
model
.
evaluate
(
input_fn
=
lambda
:
esmm_input_fn
(
val_df
,
False
))
print
(
"metrics: "
+
str
(
metrics
))
...
...
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