提交 3162664a 编写于 作者: Q Qiao Longfei

fix some problem

上级 790ed55d
#!/bin/bash
# start pserver0
python train.py \
python train_dataset.py \
--train_data_path /paddle/data/train.txt \
--is_local 0 \
--role pserver \
......@@ -11,7 +11,7 @@ python train.py \
> pserver0.log 2>&1 &
# start pserver1
python train.py \
python train_dataset.py \
--train_data_path /paddle/data/train.txt \
--is_local 0 \
--role pserver \
......@@ -21,7 +21,7 @@ python train.py \
> pserver1.log 2>&1 &
# start trainer0
python train.py \
python train_dataset.py \
--train_data_path /paddle/data/train.txt \
--is_local 0 \
--role trainer \
......@@ -31,7 +31,7 @@ python train.py \
> trainer0.log 2>&1 &
# start trainer1
python train.py \
python train_dataset.py \
--train_data_path /paddle/data/train.txt \
--is_local 0 \
--role trainer \
......
......@@ -60,7 +60,7 @@ class CriteoDataset(data_generator.MultiSlotDataGenerator):
dense_feature.append((float(features[idx]) - self.cont_min_[idx - 1]) / self.cont_diff_[idx - 1])
ret_result.append(("dense_feature", dense_feature))
for idx in self.categorical_range_:
ret_result.append((str(idx - 13), [hash(str(idx) + features[idx]) % self.hash_dim_]))
ret_result.append(("C" + str(idx - 13), [hash(str(idx) + features[idx]) % self.hash_dim_]))
ret_result.append(("label", [int(features[0])]))
yield tuple(ret_result)
......
......@@ -213,7 +213,7 @@ def train(args):
dataset.set_batch_size(128)
dataset.set_use_var(words)
pipe_command = 'python ctr_dataset_reader.py %d %d %d %d' \
% args.sparse_feature_dim, args.trainer_id, 1, args.trainer_num
% (args.sparse_feature_dim, args.trainer_id, 1, args.trainers)
dataset.set_pipe_command(pipe_command)
dataset.set_filelist(filelist)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册