diff --git a/model_zoo/research/hpc/pinns/README.md b/model_zoo/research/hpc/pinns/README.md index bdad14b3ed9..7a948cf672d 100644 --- a/model_zoo/research/hpc/pinns/README.md +++ b/model_zoo/research/hpc/pinns/README.md @@ -83,7 +83,7 @@ After installing MindSpore via the official website, you can start training and bash /scripts/run_standalone_Schrodinger_train.sh Schrodinger # Running evaluation example - python eval.py [CHECKPOINT_PATH] --scenario=Schrodinger ----datapath=[DATASET_PATH] > eval.log + python eval.py --ckpoint_path=[CHECKPOINT_PATH] --scenario=Schrodinger --datapath=[DATASET_PATH] > eval.log OR bash /scriptsrun_standalone_Schrodinger_eval.sh [CHECKPOINT_PATH] [DATASET_PATH] ``` @@ -160,7 +160,7 @@ For more configuration details, please refer the script `config.py`. Before running the command below, please check the checkpoint path used for evaluation. Please set the checkpoint path to be the absolute full path, e.g., “./ckpt/checkpoint_PINNs_Schrodinger-50000_1.ckpt”。 ```bash - python eval.py [CHECKPOINT_PATH] --scenario=Schrodinger ----datapath=[DATASET_PATH] > eval.log + python eval.py --ckpoint_path=[CHECKPOINT_PATH] --scenario=Schrodinger --datapath=[DATASET_PATH] > eval.log ``` The above python command will run in the background. You can view the results through the file "eval.log". The error of evaluation is as follows: diff --git a/model_zoo/research/hpc/pinns/README_CN.md b/model_zoo/research/hpc/pinns/README_CN.md index 0314dde3309..8e851c43653 100644 --- a/model_zoo/research/hpc/pinns/README_CN.md +++ b/model_zoo/research/hpc/pinns/README_CN.md @@ -83,7 +83,7 @@ PINNs是针对偏微分方程问题构造神经网络的思路,具体的模型 bash /scripts/run_standalone_Schrodinger_train.sh [DATASET_PATH] # 运行评估示例 - python eval.py [CHECKPOINT_PATH] --scenario=Schrodinger ----datapath=[DATASET_PATH] > eval.log + python eval.py --ckpoint_path=[CHECKPOINT_PATH] --scenario=Schrodinger --datapath=[DATASET_PATH] > eval.log OR bash /scriptsrun_standalone_Schrodinger_eval.sh [CHECKPOINT_PATH] [DATASET_PATH] ``` @@ -161,7 +161,7 @@ PINNs是针对偏微分方程问题构造神经网络的思路,具体的模型 在运行以下命令之前,请检查用于评估的检查点路径。请将检查点路径设置为绝对全路径,例如“./ckpt/checkpoint_PINNs_Schrodinger-50000_1.ckpt”。 ```bash - python eval.py [CHECKPOINT_PATH] --scenario=Schrodinger ----datapath=[DATASET_PATH] > eval.log + python eval.py --ckpoint_path=[CHECKPOINT_PATH] --scenario=Schrodinger --datapath=[DATASET_PATH] > eval.log ``` 上述python命令将在后台运行,您可以通过eval.log文件查看结果。测试误差如下: diff --git a/model_zoo/research/hpc/pinns/eval.py b/model_zoo/research/hpc/pinns/eval.py index eefecbe5eff..511ad6cdc65 100644 --- a/model_zoo/research/hpc/pinns/eval.py +++ b/model_zoo/research/hpc/pinns/eval.py @@ -58,7 +58,7 @@ def eval_PINNs_sch(ckpoint_name, num_neuron=100, path='./Data/NLS.mat'): if __name__ == '__main__': parser = argparse.ArgumentParser(description='Evaluate PINNs for Schrodinger equation scenario') - parser.add_argument('ck_file', type=str, help='model checkpoint(ckpt) filename') + parser.add_argument('--ckpoint_path', type=str, help='model checkpoint(ckpt) filename') #only support 'Schrodinger' for now parser.add_argument('--scenario', type=str, help='scenario for PINNs', default='Schrodinger') diff --git a/model_zoo/research/hpc/pinns/requirements.txt b/model_zoo/research/hpc/pinns/requirements.txt index 6cecdf7b49e..b7bd852185f 100644 --- a/model_zoo/research/hpc/pinns/requirements.txt +++ b/model_zoo/research/hpc/pinns/requirements.txt @@ -1 +1 @@ -pyDOE>=0.3.8 \ No newline at end of file +pyDOE>=0.3.8 diff --git a/model_zoo/research/hpc/pinns/scripts/run_standalone_Schrodinger_eval.sh b/model_zoo/research/hpc/pinns/scripts/run_standalone_Schrodinger_eval.sh index 7e25c888c9b..12952d0ae26 100644 --- a/model_zoo/research/hpc/pinns/scripts/run_standalone_Schrodinger_eval.sh +++ b/model_zoo/research/hpc/pinns/scripts/run_standalone_Schrodinger_eval.sh @@ -42,4 +42,4 @@ fi ck_path=$(get_real_path $1) data_set_path=$(get_real_path $2) -python ${PROJECT_DIR}/../eval.py $ck_path --scenario=Schrodinger --datapath=$data_set_path > eval.log 2>&1 & +python ${PROJECT_DIR}/../eval.py --ckpoint_path=$ck_path --scenario=Schrodinger --datapath=$data_set_path > eval.log 2>&1 &