(self)
Iterate over all image sentence pairs where an image may be repeated
Iterate over all image sentence pairs where an image may be repeated
Iterate over all image sentence pairs where an image may be repeated
def iterImageSentencePair(self):
        """Iterate over all image sentence pairs where an image may be repeated"""
        for i, img in enumerate(self.sent_data):
            for sent in img['sentences']:
                out = {}
                out['image'] = self._getImage(img)
                out['sentence'] = sent
                yield out
def iterImageSentencePair ( self ) : for i , img in enumerate ( self . sent_data ) : for sent in img [ 'sentences' ] : out = { } out [ 'image' ] = self . _getImage ( img ) out [ 'sentence' ] = sent yield out