5a69007e1ab2f4c0b4a549c0a2a8cd9701fd8929,examples/colorizer.py,,search,#Any#Any#Any#,137

Before Change


def search(config, inputs, args):
    gan = setup_gan(config, inputs, args)
    reconstruction = accuracy(tf.image.rgb_to_grayscale(gan.uniform_sample), tf.image.rgb_to_grayscale(x))
    for i in range(args.steps):
        gan.step()
        r,d = gan.session.run([reconstruction, diversity])
        sampler.sample("sample.png", False)
        print("R", r,"D", d)
        

if args.action == "train":
    train(config, inputs, args)
elif args.action == "sample":
    sample(config, inputs, args)

After Change



def search(config, inputs, args):
    metrics = train(config, inputs, args)
    if "search_output" in args:
        search_output = args.search_output
    else:
        search_output = "2d-test-results.csv"

    config_filename = "colorizer-"+str(uuid.uuid4())+".json"
    hc.Selector().save(config_filename, config)
    with open(search_output, "a") as myfile:
        myfile.write(config_filename+","+",".join([str(x) for x in metric_sum])+"\n")

if args.action == "train":
    metrics = train(config, inputs, args)
    print("Resulting metrics:", metrics)
elif args.action == "sample":
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: HyperGAN/HyperGAN
Commit Name: 5a69007e1ab2f4c0b4a549c0a2a8cd9701fd8929
Time: 2017-06-28
Author: mikkel@255bits.com
File Name: examples/colorizer.py
Class Name:
Method Name: search


Project Name: scikit-image/scikit-image
Commit Name: e1f4872fec77fe3d24ba883f9bbd96d77e417dce
Time: 2020-07-11
Author: grlee77@gmail.com
File Name: skimage/morphology/tests/test_extrema.py
Class Name: TestExtrema
Method Name: test_h_minima_float_h


Project Name: scikit-image/scikit-image
Commit Name: e1f4872fec77fe3d24ba883f9bbd96d77e417dce
Time: 2020-07-11
Author: grlee77@gmail.com
File Name: skimage/morphology/tests/test_extrema.py
Class Name: TestExtrema
Method Name: test_h_maxima_float_h