3b825a18923f298067ac8ece781d01e83ab84016,neural_style/neural_style.py,,train,#,19
Before Change
// save model
transformer.eval()
transformer.cpu()
torch.save(transformer, args.checkpoint_dir + "/epoch_" + str(args.epochs) + "_"
+ str(time.ctime()).replace(" ", "_") + "_"
+ str(args.content_weight) + "_" + str(args.style_weight)
+ ".model")
print("\nDone :)")
After Change
np.random.seed(args.seed)
torch.manual_seed(args.seed)
if args.cuda and not torch.cuda.is_available():
print("WARNING: torch.cuda not available, using CPU.")
args.cuda = 0
if args.cuda:
torch.cuda.manual_seed(args.seed)
kwargs = {"num_workers": 0, "pin_memory": False}
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: abhiskk/fast-neural-style
Commit Name: 3b825a18923f298067ac8ece781d01e83ab84016
Time: 2017-04-03
Author: abhishekkadiyan@gmail.com
File Name: neural_style/neural_style.py
Class Name:
Method Name: train
Project Name: matthewwithanm/django-imagekit
Commit Name: db95e63a632bc0bd62f1842bda8ef30e0e6df6ff
Time: 2011-08-23
Author: ryan@ryanbagwell.com
File Name: imagekit/utils.py
Class Name:
Method Name: img_to_fobj
Project Name: hassony2/kinetics_i3d_pytorch
Commit Name: 9171f92a54c620b097ffc0306d34a6c7e49c93b7
Time: 2017-11-27
Author: yana.hasson@inria.fr
File Name: i3d_tf_to_pt.py
Class Name:
Method Name: transfer_weights