diff --git a/MindSpore/src/step3/step3_test.py b/MindSpore/src/step3/step3_test.py new file mode 100644 index 0000000..9ec69e2 --- /dev/null +++ b/MindSpore/src/step3/step3_test.py @@ -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!") + +