8776ca2dcfa98412a6dafc33d360ee1ba0d1b551,src/test.py,,main,#,8
Before Change
img1 = img1.cuda()
imgs = [img1]
names = ["input"]
for idx2, img2 in enumerate(loader2):
if idx2 == opts.num:
break
img2 = img2.cuda()
with torch.no_grad():
if opts.a2b:
img = model.test_forward(img1, img2, opts.random_z, a2b=True)
else:
img = model.test_forward(img2, img1, opts.random_z, a2b=False)
imgs.append(img)
names.append("output_{}".format(idx2))
save_imgs(imgs, names, os.path.join(result_dir, "{}".format(idx1)))
return
After Change
img1 = img1.cuda()
imgs = [img1]
names = ["input"]
for n in range(opts.num):
with torch.no_grad():
img = model.test_forward(img1, a2b=opts.a2d)
imgs.append(img)
names.append("output_{}".format(idx2))
save_imgs(imgs, names, os.path.join(result_dir, "{}".format(idx1)))
return
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: HsinYingLee/DRIT
Commit Name: 8776ca2dcfa98412a6dafc33d360ee1ba0d1b551
Time: 2018-07-25
Author: james371507@gmail.com
File Name: src/test.py
Class Name:
Method Name: main
Project Name: pliablepixels/zmeventnotification
Commit Name: 1e619d91956c813d2328a5460da0a273fe135905
Time: 2019-11-15
Author: pliablepixels@gmail.com
File Name: hook/zmes_hook_helpers/face.py
Class Name: Face
Method Name: detect
Project Name: data61/python-paillier
Commit Name: 8184b9fdf51e3f75835fe1f2d56c294d16686241
Time: 2017-06-20
Author: giorgio.patrini@anu.edu.au
File Name: examples/federated_learning_with_encryption.py
Class Name:
Method Name: