File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -24,24 +24,27 @@ sed -i "s/--device:gpu/--device:npu/g" $FILENAME
24
24
sed -i " s/--benchmark:True/--benchmark:False/g" $FILENAME
25
25
dataline=` cat $FILENAME `
26
26
27
+ # parser params
28
+ IFS=$' \n '
29
+ lines=(${dataline} )
30
+
27
31
# change total iters/epochs for npu/xpu to accelaration
28
- modelname=$( echo $FILENAME | cut -d ' /' -f3)
32
+ modelname=$( func_parser_value " ${lines[1]} " )
33
+ echo $modelname
29
34
if [ $modelname == " Pix2pix" ]; then
30
35
sed -i " s/lite_train_lite_infer=10/lite_train_lite_infer=1/g" $FILENAME
36
+ sed -i " s/-o log_config.interval=1/-o log_config.interval=1 snapshot_config.interval=1/g" $FILENAME
31
37
fi
32
38
33
39
if [ $modelname == " edvr" ]; then
34
40
sed -i " s/lite_train_lite_infer=100/lite_train_lite_infer=10/g" $FILENAME
41
+ sed -i " s/snapshot_config.interval=25/snapshot_config.interval=5/g" $FILENAME
35
42
fi
36
43
37
44
# change gpu to npu in execution script
38
45
sed -i ' s/\"gpu\"/\"npu\"/g' test_tipc/test_train_inference_python.sh
39
46
sed -i ' s/--gpus/--npus/g' test_tipc/test_train_inference_python.sh
40
47
41
- # parser params
42
- IFS=$' \n '
43
- lines=(${dataline} )
44
-
45
48
# pass parameters to test_train_inference_python.sh
46
49
cmd=" bash test_tipc/test_train_inference_python.sh ${FILENAME} $2 "
47
50
echo $cmd
You can’t perform that action at this time.
0 commit comments