|
a |
|
b/Scripts/Train-Batch_run.py |
|
|
1 |
#-*- coding:utf-8 -*- |
|
|
2 |
######################### |
|
|
3 |
# filename: run.py |
|
|
4 |
######################### |
|
|
5 |
|
|
|
6 |
import subprocess,sys |
|
|
7 |
sys.path.append("..") |
|
|
8 |
|
|
|
9 |
cmds = [ |
|
|
10 |
'python dnngp_runner.py --batch_size 28 --patience 5 --lr 0.001 --dropout2 0.3 --seed 123 --epoch 5 --cv 5 --part 1 --earlystopping 10 --snp "../Input_files/wheat599_pc95.pkl" --pheno "../Input_files/wheat1.tsv" --output ../Output_files/' |
|
|
11 |
] |
|
|
12 |
|
|
|
13 |
for cmd in cmds: |
|
|
14 |
p = subprocess.Popen( |
|
|
15 |
cmd, shell=True, stdout=subprocess.PIPE |
|
|
16 |
) |
|
|
17 |
str=p.stdout.read() |
|
|
18 |
try: |
|
|
19 |
print(str.decode('utf-8')) |
|
|
20 |
except Exception: |
|
|
21 |
print(str.decode('gbk')) |