Closed pei6 closed 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.
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))
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.