提交 44f8de6d 编写于 作者: 0 0YuanZhang0 提交者: pkpk

fix_ce_and_readme (#3081)

上级 41c52901
......@@ -27,7 +27,7 @@
  注意:使用Windows GPU环境的用户,需要将示例代码中的[fluid.ParallelExecutor](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/fluid_cn.html#parallelexecutor)替换为[fluid.Executor](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/fluid_cn.html#executor)
####   b、安装代码
####   b、下载代码
    克隆数据集代码库到本地
......
......@@ -26,28 +26,28 @@ train_atis_slot(){
--enable_ce=store_true
}
train_atis_intent(){
if [ ! -d "./data/saved_models/atis_intent" ]; then
mkdir "./data/saved_models/atis_intent"
train_mrda(){
if [ ! -d "./data/saved_models/mrda" ]; then
mkdir "./data/saved_models/mrda"
fi
python -u train.py \
--task_name=atis_intent \
--task_name=mrda \
--use_cuda=true \
--do_train=true \
--in_tokens=true \
--epoch=2 \
--batch_size=4096 \
--data_dir=./data/input/data/atis/atis_intent \
--data_dir=./data/input/data/mrda \
--bert_config_path=./data/pretrain_model/uncased_L-12_H-768_A-12/bert_config.json \
--vocab_path=./data/pretrain_model/uncased_L-12_H-768_A-12/vocab.txt \
--init_from_pretrain_model=./data/pretrain_model/uncased_L-12_H-768_A-12/params \
--save_model_path=./data/saved_models/atis_intent \
--save_model_path=./data/saved_models/mrda \
--save_param="params" \
--save_steps=100 \
--save_steps=500 \
--learning_rate=2e-5 \
--weight_decay=0.01 \
--max_seq_len=128 \
--print_steps=10 \
--print_steps=200 \
--use_fp16=false \
--enable_ce=store_true
}
......@@ -56,7 +56,7 @@ train_atis_intent(){
# but it seems that this error is from the model itself.
# See issue here: https://github.com/PaddlePaddle/Paddle/issues/18994#event-2532039900
# To fix ce, disable gc in this model temporarily.
export FLAGS_eager_delete_tensor_gb=-1
export FLAGS_eager_delete_tensor_gb=1
cudaid=${multi:=0,1,2,3}
export CUDA_VISIBLE_DEVICES=$cudaid
......@@ -65,4 +65,4 @@ sleep 20
cudaid=${single:=0}
export CUDA_VISIBLE_DEVICES=$cudaid
train_atis_intent | python _ce.py
train_atis_slot | python _ce.py
......@@ -21,7 +21,7 @@
- PaddlePaddle >= 1.3.1,请参考[安装指南](http://www.paddlepaddle.org/#quick-start)进行安装, 由于模块内模型基于bert做finetuning, 训练速度较慢, 建议用户安装GPU版本PaddlePaddle进行训练。
  注意:使用Windows GPU环境的用户,需要将示例代码中的[fluid.ParallelExecutor](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/fluid_cn.html#parallelexecutor)替换为[fluid.Executor](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/fluid_cn.html#executor)
####   b、安装代码
####   b、下载代码
    克隆代码库到本地
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册