3f196bcdd1e0310208e8978cf4f1fb590614568b,utils.py,,save_model,#,28
Before Change
return policy_net, value_net
def save_model(policy_net, value_net, to_path):
if ac_rl.use_gpu:
policy_net.cpu(), value_net.cpu()
dirname = os.path.dirname(to_path)
if not(dirname):
os.makedirs(dirname)
After Change
dirname = os.path.dirname(to_path)
if not(os.path.isdir(dirname)):
os.makedirs(dirname)
torch.save(acmodel.state_dict(), to_path)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: lcswillems/torch-rl
Commit Name: 3f196bcdd1e0310208e8978cf4f1fb590614568b
Time: 2018-04-15
Author: lcswillems@gmail.com
File Name: utils.py
Class Name:
Method Name: save_model
Project Name: kuangliu/pytorch-cifar
Commit Name: 7f162085eca07b86fb00afec8fc62b5fee836b7b
Time: 2018-04-25
Author: kuang.liu@hotmail.com
File Name: main.py
Class Name:
Method Name: test
Project Name: zhirongw/lemniscate.pytorch
Commit Name: 4441480fde64e42a9c4af205bf2ab8003511172e
Time: 2018-07-26
Author: xavibrowu@gmail.com
File Name: cifar.py
Class Name:
Method Name: