From cd2c914dd4aaaff97fdef0033118d1b85f59a4af Mon Sep 17 00:00:00 2001 From: fuqianya Date: Sun, 9 Jan 2022 16:24:00 +0800 Subject: [PATCH] :memo: Update README & Add requirements --- README.md | 11 ++++++++++- requirements.txt | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 requirements.txt diff --git a/README.md b/README.md index 0736f45..faafedc 100644 --- a/README.md +++ b/README.md @@ -92,8 +92,17 @@ bash ./download_dataset.sh ### step4: 训练 +```bash +export PYTHONPATH=$PWD:$PYTHONPATH +CUDA_VISIBLE_DEVICES='0, 1, 2, 3' python -m paddle.distributed.launch tools/train_retrieval.py --cfg_file configs/retrieval_train.yaml +``` + ### step5: 测试 +```bash +python tools/eval_retrieval.py --cfg_file configs/retrieval_test.yaml +``` + ### 使用预训练模型进行预测 ## 六、代码结构与详细说明 @@ -115,7 +124,7 @@ bash ./download_dataset.sh ├── tests # 测试文件 ├── tools │ └── train_retrieval.py # 训练脚本 -│ └── test_retrieval.py # 测试脚本 +│ └── eval_retrieval.py # 测试脚本 └── requirement.txt # 依赖包 ``` diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a40b41d --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +paddlenlp>=2.2.1 +paddlepaddle-gpu>=2.2.1 +yacs==0.1.8 +boto3 \ No newline at end of file