This commit is contained in:
郭明月 2020-07-09 02:42:18 +08:00
parent a4022ceeb4
commit 1b1366dd62
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
import train_net
import object
if __name__ == '__main__':
# add objects for searching
objs = [
"ds_train=create_dataset(os.path.join(mnist_path,",
"model.train(epoch_size,ds_train,callbacks=[ckpoint_cb,LossMonitor()],dataset_sink_mode=False)",
"config_ck=CheckpointConfig(save_checkpoint_steps=1875,keep_checkpoint_max=10)",
"ckpoint_cb=ModelCheckpoint(prefix="
]
filepath = "./MindSpore/src/step3/train_net.py"
if (object.objectFind(objs, filepath)):
print("----------------")
print("ok!")
else:
print("object error!")