Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
b0494cfa
Commit
b0494cfa
authored
Jun 11, 2019
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
并行数据转换
parent
72cbd9da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
train.py
eda/esmm/Model_pipline/train.py
+2
-1
No files found.
eda/esmm/Model_pipline/train.py
View file @
b0494cfa
...
...
@@ -81,7 +81,8 @@ def input_fn(filenames, batch_size=32, num_epochs=1, perform_shuffle=False):
# dataset = dataset.repeat(num_epochs)
# dataset = dataset.batch(batch_size) # Batch size to use
dataset
=
tf
.
data
.
TFRecordDataset
(
filenames
)
.
apply
(
tf
.
contrib
.
map_and_batch
(
map_func
=
_parse_fn
,
batch_size
=
batch_size
))
dataset
=
tf
.
data
.
TFRecordDataset
(
filenames
)
.
apply
(
tf
.
contrib
.
data
.
map_and_batch
(
map_func
=
_parse_fn
,
batch_size
=
batch_size
,
num_parallel_calls
=
8
))
dataset
=
dataset
.
prefetch
(
500000
)
# dataset = dataset.padded_batch(batch_size, padded_shapes=({"feeds_ids": [None], "feeds_vals": [None], "title_ids": [None]}, [None])) #不定长补齐
...
...
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