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

decrease test data, test=develop (#25252)

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