提交 b83c77e1 编写于 作者: M Megvii Engine Team

test(mge/test_save_load): remove test model file

GitOrigin-RevId: 893b82b1c93b07e778310799b78b822e8eaa4246
上级 c5229913
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import os
import numpy as np import numpy as np
import megengine as mge import megengine as mge
...@@ -53,6 +62,7 @@ def test_save_load(): ...@@ -53,6 +62,7 @@ def test_save_load():
optim = optimizer.SGD(net.parameters(), lr=1.0, momentum=0.9) optim = optimizer.SGD(net.parameters(), lr=1.0, momentum=0.9)
optim.load_state_dict(checkpoint["opt_state"]) optim.load_state_dict(checkpoint["opt_state"])
print("load done") print("load done")
os.remove("simple.pkl")
with gm: with gm:
loss = net([1.23]) loss = net([1.23])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册