This commit is contained in:
马天姿 2020-07-09 03:18:10 +08:00
parent e8945f2b00
commit 2edac8dab0
1 changed files with 28 additions and 0 deletions

View File

@ -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!")