INNER CODE UNIT · Python
__eq__
allenai/ai2thor · ai2thor/server.py:230
def __eq__(self, other: object):
if isinstance(other, self.__class__):
return self.instance_masks == other.instance_masks
else:
return False
class LazyInstanceDetections2D(LazyDetections2D):
def __init__(self, instance_masks: LazyInstanceSegmentationMasks):
super().__init__(instance_masks)
self._detections2d: Dict[str, Optional[Tuple[int, int, int, int]]] = {}
def __eq__(self, other: object):
if isinstance(other, self.__class__):
return self.instance_masks == other.instance_masks
else:
return False