bd090db61ce516a22c8c433bec29a9be7c1c62a2,examples/alignment.py,,,#,33

Before Change



config = hg.configuration.Configuration.load(config_file+".json")

config_name="alignment-"+str(uuid.uuid4()).split("-")[0]
config_filename = os.path.expanduser("~/.hypergan/configs/"+config_name+".json")
print("Saving config to ", config_filename)

hc.Selector().save(config_filename, config)

After Change



from hypergan.samplers.random_walk_sampler import RandomWalkSampler

arg_parser = ArgumentParser("Align two unaligned distributions.  One is black and white of image.")
arg_parser.add_image_arguments()
args = arg_parser.parse_args()

width, height, channels = parse_size(args.size)

config = lookup_config(args)

save_file = "save/model.ckpt"

if args.action == "search":
    config = AlignedRandomSearch({}).random_config()

    if args.config_list is not None:
        lines = tuple(open(args.config_list, "r"))
        config_file = random.choice(lines).strip()
        config = hg.configuration.Configuration.load(config_file+".json")
        random_config = AlignedRandomSearch({}).random_config()

        config["generator"]=random_config["generator"]
        config["discriminator"]=random_config["discriminator"]
        // TODO Other search terms?
        print("config list chosen", config_file)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: HyperGAN/HyperGAN
Commit Name: bd090db61ce516a22c8c433bec29a9be7c1c62a2
Time: 2017-06-28
Author: mikkel@255bits.com
File Name: examples/alignment.py
Class Name:
Method Name:


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 4b91143f8848e0df40955163ad851603dd12e70a
Time: 2020-06-15
Author: tmatsuo@google.com
File Name: iam/api-client/service_accounts_test.py
Class Name:
Method Name: test_service_accounts


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: d6ef26173d1f2e65ec65570683e8ca43d054c8d4
Time: 2016-09-20
Author: nlavine@google.com
File Name: perfkitbenchmarker/providers/azure/azure_network.py
Class Name: AzureNetwork
Method Name: __init__