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