NVIDIA / vid2vid

Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic video-to-video translation.
Other
8.58k stars 1.2k forks source link

fix a code bug related to tuple to integer value assign #28

Closed pei6 closed 6 years ago

pei6 commented 6 years ago

variable size is a tuple with 2 integer value inside. We use code like below: w, h = size to assign its value to 2 integer variable.

R0bk commented 6 years ago

Not a maintainer or developer on this repo but unless I'm mistaken

def __crop(img, pos, size, square=True):

is only called on lines 48 and 50 of data/base_dataset.py as as can be seen

lambda img: __crop(img, params['crop_pos'], opt.fineSize)

size is equal to opt.fineSize which should be an int as per options/base_options.py.

pei6 commented 6 years ago

you are right, so i would callback this issue. but the code is confuse and not the good style, i better like the caller also change the input parameter to: lambda img: __crop(img, params['crop_pos'], (opt.fineSize, opt.fineSize))