From cf3e81d6bfa28598756f8a5c27ca60cbf1293179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=A4=A9=E5=A7=BF?= Date: Wed, 8 Jul 2020 02:08:46 +0800 Subject: [PATCH] test --- MindSpore/src/step1/step1_test.py | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 MindSpore/src/step1/step1_test.py diff --git a/MindSpore/src/step1/step1_test.py b/MindSpore/src/step1/step1_test.py new file mode 100644 index 0000000..84e0518 --- /dev/null +++ b/MindSpore/src/step1/step1_test.py @@ -0,0 +1,36 @@ +import net +import object + +if __name__ == '__main__': + + # add objects for searching + objs = [ + + + "weight=weight_variable()", + "bias=weight_variable()", + "returnnn.Dense(input_channels,out_channels,weight,bias)", + "x=self.conv1(x)", + "x=self.relu(x)", + "x=self.max_pool2d(x)", + "x=self.conv2(x)", + "x=self.flatten(x)", + "x=self.fc1(x)", + "x=self.fc2(x)", + "x=self.fc3(x)" + + + + + + ] + + filepath = "./MindSpore/src/step1/net.py" + + if (object.objectFind(objs, filepath)): + print("----------------") + print("ok!") + else: + print("object error!") + +