test.py
This commit is contained in:
parent
5bab957533
commit
89bef8c353
|
@ -0,0 +1,26 @@
|
|||
|
||||
import step2
|
||||
import object
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
# add objects for searching
|
||||
objs = [
|
||||
|
||||
|
||||
"net_loss=SoftmaxCrossEntropyWithLogits(is_grad=False,sparse=True",
|
||||
"net_opt=nn.Momentum(network.trainable_params(),lr,momentum)",
|
||||
"config_ck=CheckpointConfig(save_checkpoint_steps=1875,keep_checkpoint_max=10)"
|
||||
|
||||
|
||||
]
|
||||
|
||||
filepath = "./MindSpore/src/step2/step2.py"
|
||||
|
||||
if (object.objectFind(objs, filepath)):
|
||||
print("----------------")
|
||||
|
||||
print("ok!")
|
||||
else:
|
||||
print("object error!")
|
||||
|
Loading…
Reference in New Issue