# Print model's state_dict
print("Model's state_dict:")
for param_tensor in model.state_dict():
print(param_tensor, "\t", model.state_dict()[param_tensor].size())
# Print optimizer's state_dict
print("Optimizer's state_dict:")
for var_name in optimizer.state_dict():
print(var_name, "\t", optimizer.state_dict()[var_name])
Last active
September 17, 2020 09:12
-
-
Save nlpjoe/4f8961b5ea64685c9ff5f9c0ff3d74dc to your computer and use it in GitHub Desktop.
[utils] #ml #pytorch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oss连接工具 IO | |
odps读table | |
pytorch训练/测试 读odps表 dataset | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment