From 2edac8dab0966deb4b914254d7656ab6e88b46fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=A4=A9=E5=A7=BF?= Date: Thu, 9 Jul 2020 03:18:10 +0800 Subject: [PATCH] test --- MindSpore/src/step4/step4_test.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 MindSpore/src/step4/step4_test.py diff --git a/MindSpore/src/step4/step4_test.py b/MindSpore/src/step4/step4_test.py new file mode 100644 index 0000000..d56fb41 --- /dev/null +++ b/MindSpore/src/step4/step4_test.py @@ -0,0 +1,28 @@ + +import test_net +import object + +if __name__ == '__main__': + + # add objects for searching + objs = [ + + + "param_dict=load_checkpoint(", + "load_param_into_net(network,param_dict)", + "ds_eval=create_dataset(os.path.join(mnist_path,", + "acc=model.eval(ds_eval, dataset_sink_mode=False)" + + + ] + + filepath = "./MindSpore/src/step4/test_net.py" + + if (object.objectFind(objs, filepath)): + print("----------------") + + print("ok!") + else: + print("object error!") + +