645c7c386e62d2fb1d50f4621c1a52645a13869f,fast_neural_style/neural_style/neural_style.py,,stylize,#Any#,137
Before Change
content_image = content_image.unsqueeze(0)
if args.cuda:
content_image = content_image.cuda()
content_image = Variable(content_image, volatile=True)
style_model = TransformerNet()
style_model.load_state_dict(torch.load(args.model))
if args.cuda:
After Change
transforms.Lambda(lambda x: x.mul(255))
])
content_image = content_transform(content_image)
content_image = content_image.unsqueeze(0).to(device)
with torch.no_grad():
style_model = TransformerNet()
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 3
Instances
Project Name: pytorch/examples
Commit Name: 645c7c386e62d2fb1d50f4621c1a52645a13869f
Time: 2018-04-24
Author: soumith@gmail.com
File Name: fast_neural_style/neural_style/neural_style.py
Class Name:
Method Name: stylize
Project Name: pytorch/examples
Commit Name: bf82a7b48e620dfbee14d55afec26e0810a32199
Time: 2017-03-14
Author: bryan.mccann.is@gmail.com
File Name: OpenNMT/onmt/Models.py
Class Name: Decoder
Method Name: forward
Project Name: OpenNMT/OpenNMT-py
Commit Name: 57112455fc0288a68fc01a79ccd747caf5e5a696
Time: 2017-03-14
Author: bryan.mccann.is@gmail.com
File Name: onmt/Models.py
Class Name: Decoder
Method Name: forward
Project Name: xinntao/BasicSR
Commit Name: 2b38855e22530bab3e66dda77c4fc653c141c1d1
Time: 2018-06-11
Author: wxt1994@126.com
File Name: codes/models/modules/sft_arch.py
Class Name:
Method Name:
Project Name: jadore801120/attention-is-all-you-need-pytorch
Commit Name: 0b0eabbfd972c9e3f6323bff9d39ac5fc3ba9cc7
Time: 2018-08-23
Author: yhhuang@nlg.csie.ntu.edu.tw
File Name: transformer/Translator.py
Class Name: Translator
Method Name: translate_batch