def sample_once(it): rows = 10 columns = 10 feed = {random_z: np.random.normal(size=[rows * columns, z_dim])} list_of_generators = image_sets # used for sampling images list_of_names = ['it%d-c%d.jpg' %(it,i) for i in range(len(image_sets))] save_dir = dir + "/sample_imgs" my_utils.sample_and_save(sess=sess, list_of_generators=list_of_generators, feed_dict=feed, list_of_names=list_of_names, save_dir=save_dir)
def sample_once(it): rows = 10 columns = 10 feed = {random_z: np.random.normal(size=[rows * columns, z_dim])} list_of_generators = [images_from_g] # used for sampling images list_of_names = ['it%d-g.jpg' % it] save_dir = dir + "/sample_imgs" my_utils.sample_and_save(sess=sess, list_of_generators=list_of_generators, feed_dict=feed, list_of_names=list_of_names, save_dir=save_dir)
def sample_once(it): rows = 10 columns = 10 feed = {sample_from_gmm: sample_gmm(size=rows*columns), sample_from_c1: sample_from_gaussian(mus[0], cov, 12), sample_from_c2: sample_from_gaussian(mus[1], cov, 12), sample_from_c3: sample_from_gaussian(mus[2], cov, 12)} list_of_generators = [images_form_de, images_form_c1, images_form_c2, images_form_c3] # used for sampling images list_of_names = ['it%d-de.jpg' % it, 'it%d-c1.jpg' % it, 'it%d-c2.jpg' % it,'it%d-c3.jpg' % it,] save_dir = dir + "/sample_imgs" my_utils.sample_and_save(sess=sess, list_of_generators=list_of_generators, feed_dict=feed, list_of_names=list_of_names, save_dir=save_dir)
def sample_once(it): rows = 10 columns = 10 feed = {z: sample_from_gmm(batch_size, k), z1: sample_from_gaussian(mean=mus[0],cov=cov, size=batch_size), z2: sample_from_gaussian(mean=mus[1],cov=cov, size=batch_size), z3: sample_from_gaussian(mean=mus[2],cov=cov, size=batch_size), z4: sample_from_gaussian(mean=mus[3],cov=cov, size=batch_size)} list_of_generators = [images_form_g, images_form_c1, images_form_c2, images_form_c3, images_form_c4] # used for sampling images list_of_names = ['it%d-g.jpg' % it, 'it%d-c1.jpg' % it, 'it%d-c2.jpg' % it, 'it%d-c3.jpg' % it, 'it%d-c4.jpg' % it] save_dir = dir + "/sample_imgs" my_utils.sample_and_save(sess=sess, list_of_generators=list_of_generators, feed_dict=feed, list_of_names=list_of_names, save_dir=save_dir)
def sample_once(it): rows = 10 columns = 10 list_of_generators = image_sets # used for sampling images list_of_names = [] for i in range(len(image_sets)): list_of_names.append('it%d-g%d.jpg' % (it, i)) # list_of_names = ['g1-it%d.jpg' % it, 'g2-it%d.jpg' % it] feeds = {z: np.random.normal(size=[rows * columns, z_dim])} my_utils.sample_and_save(sess, list_of_generators, list_of_names, feeds, dir + "/sample_imgs", rows, columns, normalize=True) print('save sample images')
def sample_once(it): rows = 10 columns = 10 feed = { random_z: np.random.normal(size=[rows * columns, z_dim]), random_z_2: np.random.normal(size=[rows * columns, z_dim]) } list_of_generators = [ images_form_de, images_form_c1, images_form_c2, images_form_c3 ] # used for sampling images list_of_names = [ 'it%d-de.jpg' % it, 'it%d-c1.jpg' % it, 'it%d-c2.jpg' % it, 'it%d-c3.jpg' % it, ] save_dir = dir + "/sample_imgs" my_utils.sample_and_save(sess=sess, list_of_generators=list_of_generators, feed_dict=feed, list_of_names=list_of_names, save_dir=save_dir)
def sample_once(it): rows = 10 columns = 10 feed = create_feed( size=rows * columns, additional_items={z: sample_from_gmm(size=rows * columns, k=k)}) list_of_generators = [ images_form_g, images_form_c1, images_form_c2, images_form_c3, images_form_c4 ] # used for sampling images list_of_names = [ 'it%d-g.jpg' % it, 'it%d-c1.jpg' % it, 'it%d-c2.jpg' % it, 'it%d-c3.jpg' % it, 'it%d-c4.jpg' % it ] save_dir = dir + "/sample_imgs" my_utils.sample_and_save(sess=sess, list_of_generators=list_of_generators, feed_dict=feed, list_of_names=list_of_names, save_dir=save_dir)