未验证 提交 f6f7df9c 编写于 作者: T tangwei12 提交者: GitHub

decrease test data, test=develop (#25252)

上级 2d5aa743
...@@ -66,15 +66,19 @@ class CtrReader(object): ...@@ -66,15 +66,19 @@ class CtrReader(object):
pass pass
def _reader_creator(self, filelist): def _reader_creator(self, filelist):
def get_rand(low=0.0, high=1.0):
return random.random()
def reader(): def reader():
for file in filelist: for file in filelist:
with open(file, 'r') as f: with open(file, 'r') as f:
for line in f: for line in f:
fs = line.strip().split('\t') if get_rand() < 0.05:
dnn_input = load_dnn_input_record(fs[0]) fs = line.strip().split('\t')
lr_input = load_lr_input_record(fs[1]) dnn_input = load_dnn_input_record(fs[0])
click = [int(fs[2])] lr_input = load_lr_input_record(fs[1])
yield [dnn_input] + [lr_input] + [click] click = [int(fs[2])]
yield [dnn_input] + [lr_input] + [click]
return reader return reader
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册