(image_size_str)
return int(width), int(height)
If input image_size_str is "123x456", then output (123, 456)
If input image_size_str is "123x456", then output (123, 456)
If input image_size_str is 123x456 then output ( 123 456 )
def _get_input_img_size_from_string(image_size_str):
    ''' If input image_size_str is "123x456", then output (123, 456) '''
    width, height = map(int, image_size_str.split('x'))
    if width % 16 != 0 or height % 16 != 0:
        raise Exception('Width and height should be multiples of 16. w=%d, h=%d' % (width, height))
    return int(width), int(height)
def _get_input_img_size_from_string ( image_size_str ) : width , height = map ( int , image_size_str . split ( 'x' ) ) if width % 16 != 0 or height % 16 != 0 : raise Exception ( 'Width and height should be multiples of 16. w=%d, h=%d' % ( width , height ) ) return int ( width ) , int ( height )