This commit is contained in:
马天姿 2020-07-08 02:08:46 +08:00
parent d614af6605
commit cf3e81d6bf
1 changed files with 36 additions and 0 deletions

View File

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