!2940 fix gat train fail caused by checkpoint permission and missing data path in README.MD

Merge pull request !2940 from zhangdengcheng/master
This commit is contained in:
mindspore-ci-bot 2020-07-08 20:33:05 +08:00 committed by Gitee
commit fdc3a235e6
2 changed files with 4 additions and 2 deletions

View File

@ -72,9 +72,9 @@ sh run_process_data.sh [SRC_PATH] [DATASET_NAME]
>> Launch
```
#Generate dataset in mindrecord format for cora
sh run_process_data.sh cora
./run_process_data.sh ./data cora
#Generate dataset in mindrecord format for citeseer
sh run_process_data.sh citeseer
./run_process_data.sh ./data citeseer
```
# Features

View File

@ -96,6 +96,8 @@ def train():
if eval_acc >= val_acc_max and eval_loss < val_loss_min:
val_acc_model = eval_acc
val_loss_model = eval_loss
if os.path.exists("ckpts/gat.ckpt"):
os.remove("ckpts/gat.ckpt")
_exec_save_checkpoint(train_net.network, "ckpts/gat.ckpt")
val_acc_max = np.max((val_acc_max, eval_acc))
val_loss_min = np.min((val_loss_min, eval_loss))