(img_iter, img_path, img_dir,
                                       image_channel_size=3)
return (examples_iter, num_feats)
Note: one of img_iter and img_path must be not None
        Args:
            img_iter(iterator): an iterator that yields pairs (img, filename)
                (or None)
            img_path(str): location of a src file containing image paths
                (or None)
            src_dir (str): location of source images

        Returns:
            (example_dict iterator, num_feats) tuple
Note: one of img_iter and img_path must be not None
        Args:
            img_iter(iterator): an iterator that yields pairs (img, filename)
                (or None)
            img_path(str): location of a src file containing image paths
                (or None)
            src_dir (str): location of source images
Note : one of img_iter and img_path must be not None Args : img_iter ( iterator ) : an iterator that yields pairs ( img filename ) ( or None ) img_path ( str ) : location of a src file containing image paths ( or None ) src_dir ( str ) : location of source images
def make_image_examples_nfeats_tpl(img_iter, img_path, img_dir,
                                       image_channel_size=3):
        """
        Note: one of img_iter and img_path must be not None
        Args:
            img_iter(iterator): an iterator that yields pairs (img, filename)
                (or None)
            img_path(str): location of a src file containing image paths
                (or None)
            src_dir (str): location of source images

        Returns:
            (example_dict iterator, num_feats) tuple
        """
        if img_iter is None:
            if img_path is not None:
                img_iter = ImageDataset. \
                    make_img_iterator_from_file(img_path,
                                                img_dir,
                                                image_channel_size)
            else:
                raise ValueError("""One of 'img_iter' and 'img_path'
                                    must be not None""")
        examples_iter = ImageDataset.make_examples(img_iter, img_dir, 'src')
        num_feats = 0  # Source side(img) has no features.

        return (examples_iter, num_feats)
def make_image_examples_nfeats_tpl ( img_iter , img_path , img_dir , image_channel_size = 3 ) : if img_iter is None : if img_path is not None : img_iter = ImageDataset . make_img_iterator_from_file ( img_path , img_dir , image_channel_size ) else : raise ValueError ( """One of 'img_iter' and 'img_path'
                                    must be not None""" ) examples_iter = ImageDataset . make_examples ( img_iter , img_dir , 'src' ) num_feats = 0 # Source side(img) has no features. return ( examples_iter , num_feats )