Browse Source

fix scripts for fasttext

pull/15950/head
cristoval 4 years ago
parent
commit
b3da728472
2 changed files with 4 additions and 5 deletions
  1. +3
    -3
      model_zoo/official/nlp/fasttext/eval.py
  2. +1
    -2
      model_zoo/official/nlp/fasttext/scripts/run_standalone_train.sh

+ 3
- 3
model_zoo/official/nlp/fasttext/eval.py View File

@@ -37,15 +37,15 @@ parser.add_argument('--device_target', type=str, default="Ascend", choices=['Asc
args = parser.parse_args() args = parser.parse_args()
if args.data_name == "ag": if args.data_name == "ag":
from src.config import config_ag as config
from src.config import config_ag as config_ascend
from src.config import config_ag_gpu as config_gpu from src.config import config_ag_gpu as config_gpu
target_label1 = ['0', '1', '2', '3'] target_label1 = ['0', '1', '2', '3']
elif args.data_name == 'dbpedia': elif args.data_name == 'dbpedia':
from src.config import config_db as config
from src.config import config_db as config_ascend
from src.config import config_db_gpu as config_gpu from src.config import config_db_gpu as config_gpu
target_label1 = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13'] target_label1 = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13']
elif args.data_name == 'yelp_p': elif args.data_name == 'yelp_p':
from src.config import config_yelpp as config
from src.config import config_yelpp as config_ascend
from src.config import config_yelpp_gpu as config_gpu from src.config import config_yelpp_gpu as config_gpu
target_label1 = ['0', '1'] target_label1 = ['0', '1']
context.set_context( context.set_context(


+ 1
- 2
model_zoo/official/nlp/fasttext/scripts/run_standalone_train.sh View File

@@ -51,6 +51,5 @@ cp -r ../scripts/*.sh ./train
cd ./train || exit cd ./train || exit
echo "start training for device $DEVICE_ID" echo "start training for device $DEVICE_ID"
env > env.log env > env.log
#python train.py --data_path $DATASET --data_name $DATANAME > log_fasttext.log 2>&1 &
python train.py --data_path $DATASET --data_name $DATANAME
python train.py --data_path $DATASET --data_name $DATANAME > log_fasttext.log 2>&1 &
cd .. cd ..

Loading…
Cancel
Save