提交 e28831f5 编写于 作者: Z zhengya01

add text_matching_on_quora

上级 28c7af4b
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
export MKL_NUM_THREADS=1 export MKL_NUM_THREADS=1
export OMP_NUM_THREADS=1 export OMP_NUM_THREADS=1
cudaid=${language_model:=0} # use 0-th card as default cudaid=${text_matching_on_quora:=0} # use 0-th card as default
export CUDA_VISIBLE_DEVICES=$cudaid export CUDA_VISIBLE_DEVICES=$cudaid
FLAGS_benchmark=true python train_and_evaluate.py --model_name=cdssmNet --config=cdssm_base --enable_ce | python _ce.py FLAGS_benchmark=true python train_and_evaluate.py --model_name=cdssmNet --config=cdssm_base --enable_ce | python _ce.py
cudaid=${language_model_m:=0,1,2,3} # use 0,1,2,3 card as default cudaid=${text_matching_on_quora_m:=0,1,2,3} # use 0,1,2,3 card as default
export CUDA_VISIBLE_DEVICES=$cudaid export CUDA_VISIBLE_DEVICES=$cudaid
FLAGS_benchmark=true python train_and_evaluate.py --model_name=cdssmNet --config=cdssm_base --enable_ce | python _ce.py FLAGS_benchmark=true python train_and_evaluate.py --model_name=cdssmNet --config=cdssm_base --enable_ce | python _ce.py
...@@ -37,8 +37,6 @@ parser.add_argument('--enable_ce', action='store_true', help='If set, run the ta ...@@ -37,8 +37,6 @@ parser.add_argument('--enable_ce', action='store_true', help='If set, run the ta
DATA_DIR = os.path.join(os.path.expanduser('~'), '.cache/paddle/dataset') DATA_DIR = os.path.join(os.path.expanduser('~'), '.cache/paddle/dataset')
SEED = 102
def evaluate(epoch_id, exe, inference_program, dev_reader, test_reader, fetch_list, feeder, metric_type): def evaluate(epoch_id, exe, inference_program, dev_reader, test_reader, fetch_list, feeder, metric_type):
""" """
evaluate on test/dev dataset evaluate on test/dev dataset
...@@ -145,6 +143,7 @@ def train_and_evaluate(train_reader, ...@@ -145,6 +143,7 @@ def train_and_evaluate(train_reader,
# only for ce # only for ce
args = parser.parse_args() args = parser.parse_args()
if args.enable_ce: if args.enable_ce:
SEED = 102
fluid.default_startup_program().random_seed = SEED fluid.default_startup_program().random_seed = SEED
fluid.default_main_program().random_seed = SEED fluid.default_main_program().random_seed = SEED
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册