for content_path in content_paths:
for style_path in style_paths:
content = content_transform(Image.open(content_path)).unsqueeze(0)
style = style_transform(Image.open(style_path)).unsqueeze(0)
if args.gpu:
style = style.cuda()
content = content.cuda()
After Change
for style_path in style_paths:
content = content_transform(Image.open(content_path))
style = style_transform(Image.open(style_path))
if args.preserve_color:
style = coral(style, content)
if args.gpu:
style = style.cuda()
content = content.cuda()
content = Variable(content.unsqueeze(0), volatile=True)