How to use the patchy.PatchySan function in patchy

To help you get started, we’ve selected a few patchy 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 rusty1s / graph-based-image-classification / eval.py View on Github external
def dataset(config):
    """Reads and initializes a dataset specified by a passed configuration.

    Args:
        config: Configuration object.

    Returns:
        A dataset.
    """

    if config['name'] in datasets:
        return datasets[config['name']].create(config)
    elif config['name'] == 'patchy_san':
        return PatchySan.create(config)
    else:
        raise ValueError('Dataset not found.')
github rusty1s / graph-based-image-classification / train.py View on Github external
def dataset(config):
    """Reads and initializes a dataset specified by a passed configuration.

    Args:
        config: Configuration object.

    Returns:
        A dataset.
    """

    if config['name'] in datasets:
        return datasets[config['name']].create(config)
    elif config['name'] == 'patchy_san':
        return PatchySan.create(config)
    else:
        raise ValueError('Dataset not found.')
github rusty1s / graph-based-image-classification / dataset.py View on Github external
def dataset(config):
    """Reads and initializes a dataset specified by a passed configuration.

    Args:
        config: Configuration object.

    Returns:
        A dataset.
    """

    if config['name'] in datasets:
        return datasets[config['name']].create(config)
    elif config['name'] == 'patchy_san':
        return PatchySan.create(config)
    else:
        raise ValueError('Dataset not found.')
github rusty1s / graph-based-image-classification / patchy.py View on Github external
def main(argv=None):
    pascal = PascalVOC()
    grapher = SegmentationGrapher(
        slic_generator(300), [adjacency_euclidean_distance])

    patchy = PatchySan(pascal, grapher, distort_inputs=True, num_nodes=300,
                       write_num_epochs=10)