Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
serviceRec
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
郭羽
serviceRec
Commits
74eceee2
Commit
74eceee2
authored
3 years ago
by
郭羽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
service model 优化
parent
36e8047b
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
train_service.py
train/train_service.py
+2
-2
No files found.
train/train_service.py
View file @
74eceee2
...
...
@@ -83,7 +83,7 @@ def getTrainColumns(train_columns,data_vocab):
emb_columns
.
append
(
col
)
inputs
[
feature
]
=
tf
.
keras
.
layers
.
Input
(
name
=
feature
,
shape
=
(),
dtype
=
'string'
)
elif
feature
.
endswith
(
"_number"
):
elif
feature
.
endswith
(
"_number"
)
and
feature
.
startswith
(
"item"
)
:
col
=
tf
.
feature_column
.
numeric_column
(
feature
)
number_columns
.
append
(
col
)
inputs
[
feature
]
=
tf
.
keras
.
layers
.
Input
(
name
=
feature
,
shape
=
(),
dtype
=
'float32'
)
...
...
@@ -112,7 +112,7 @@ def train(emb_columns, number_columns, inputs, train_dataset):
# train the model
print
(
"train start..."
)
model
.
fit
(
train_dataset
,
epochs
=
5
)
model
.
fit
(
train_dataset
,
epochs
=
1
)
print
(
"train end..."
)
print
(
"train save..."
)
...
...
This diff is collapsed.
Click to expand it.
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