How to use the pot.ImagePot function in POT

To help you get started, we’ve selected a few POT examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tolstikhin / adagan / adagan.py View on Github external
if opts['dataset'] in ('gmm', 'circle_gmm'):
            if opts['unrolled'] is True:
                gan_class = GAN.ToyUnrolledGan
            else:
                gan_class = GAN.ToyGan
        elif opts['dataset'] in pic_datasets:
            if opts['unrolled']:
                gan_class = GAN.ImageUnrolledGan
                # gan_class = GAN.ToyUnrolledGan
            else:
                if 'vae' in opts and opts['vae']:
                    gan_class = VAE.ImageVae
                    assert opts['latent_space_distr'] == 'normal',\
                        'VAE works only with Gaussian prior'
                elif 'pot' in opts and opts['pot']:
                    gan_class = POT.ImagePot
                else:
                    gan_class = GAN.ImageGan
                    if opts['dataset'] in supervised_pic_datasets\
                            and 'conditional' in opts and opts['conditional']:
                        gan_class = GAN.MNISTLabelGan
        elif opts['dataset'] == 'guitars':
            if opts['unrolled']:
                gan_class = GAN.ImageUnrolledGan
            else:
                gan_class = GAN.BigImageGan
        else:
            assert False, "We don't have any other GAN implementations yet..."
        self._gan_class = gan_class
        if opts["inverse_metric"]:
            inv_num = opts['inverse_num']
            assert inv_num < data.num_points, \

POT

Python Optimal Transport Library

MIT
Latest version published 2 months ago

Package Health Score

81 / 100
Full package analysis