test
This commit is contained in:
parent
d614af6605
commit
cf3e81d6bf
|
@ -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!")
|
||||
|
||||
|
Loading…
Reference in New Issue