polyvore_outfits.py
def load_train_item(self, image_id):
        """ Returns a single item in the triplet and its data
        """
        imfn = os.path.join(self.impath, '%s.jpg' % image_id)
        img = self.loader(imfn)
        if self.transform is not None:
            img = self.transform(img)

        if image_id in self.im2desc:
            text = self.im2desc[image_id]
            text_features = self.desc2vecs[text]
            has_text = 1
        else:
            text_features = np.zeros(self.text_feat_dim, np.float32)
            has_text = 0.

        has_text = np.float32(has_text)
        item_type = self.im2type[image_id]
        return img, text_features, has_text, item_type
 Returns a single item in the triplet and its data
        
Returns a single item in the triplet and its data
Returns a single item in the triplet and its data
def load_train_item(self, image_id):
        imfn = os.path.join(self.impath, '%s.jpg' % image_id)
        img = self.loader(imfn)
        if self.transform is not None:
            img = self.transform(img)
        if image_id in self.im2desc:
            text = self.im2desc[image_id]
            text_features = self.desc2vecs[text]
            has_text = 1
        else:
            text_features = np.zeros(self.text_feat_dim, np.float32)
            has_text = 0.
        has_text = np.float32(has_text)
        item_type = self.im2type[image_id]
        return img, text_features, has_text, item_type
def load_train_item ( self , image_id ) : imfn = os . path . join ( self . impath , '%s.jpg' % image_id ) img = self . loader ( imfn ) if self . transform is not None : img = self . transform ( img ) if image_id in self . im2desc : text = self . im2desc [ image_id ] text_features = self . desc2vecs [ text ] has_text = 1 else : text_features = np . zeros ( self . text_feat_dim , np . float32 ) has_text = 0. has_text = np . float32 ( has_text ) item_type = self . im2type [ image_id ] return img , text_features , has_text , item_type
Returns a single item in the triplet and its data
Returns a single item in the triplet and its data
""" Returns a single item in the triplet and its data
        """
self
image_id