Searched refs:int_or_tuple (Results 1 – 1 of 1) sorted by relevance
292 def two_element_tuple(int_or_tuple): argument310 if isinstance(int_or_tuple, (list, tuple)):311 if len(int_or_tuple) != 2:312 raise ValueError('Must be a list with 2 elements: %s' % int_or_tuple)313 return int(int_or_tuple[0]), int(int_or_tuple[1])314 if isinstance(int_or_tuple, int):315 return int(int_or_tuple), int(int_or_tuple)316 if isinstance(int_or_tuple, tensor_shape.TensorShape):317 if len(int_or_tuple) == 2:318 return int_or_tuple[0], int_or_tuple[1]