Skip to content

Commit b10d338

Browse files
author
utak3r
committed
Make it compatible with python3
1 parent c19977a commit b10d338

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

style.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,9 @@ def transfer_style(self, img_style, img_content, length=512, ratio=1e5,
437437
# compute data bounds
438438
data_min = -self.transformer.mean["data"][:,0,0]
439439
data_max = data_min + self.transformer.raw_scale["data"]
440-
data_bounds = [(data_min[0], data_max[0])]*(img0.size/3) + \
441-
[(data_min[1], data_max[1])]*(img0.size/3) + \
442-
[(data_min[2], data_max[2])]*(img0.size/3)
440+
data_bounds = [(data_min[0], data_max[0])] * int(img0.size / 3) + \
441+
[(data_min[1], data_max[1])] * int(img0.size / 3) + \
442+
[(data_min[2], data_max[2])] * int(img0.size / 3)
443443

444444
# optimization params
445445
grad_method = "L-BFGS-B"

0 commit comments

Comments
 (0)