7d8f3f66495979f1bbd27205d422d673991709f2,GANs/stylegan2/generate.py,,main,#,98

Before Change


    nn.load_parameters("styleGAN2_G_params.h5")
    rgb_output = generate(batch_size, style_noises,
                          args.stochastic_seed, args.truncation_psi)
    rgb_output.forward()

    // convert to uint8 to save an image file
    image = convert_images_to_uint8(rgb_output, drange=[-1, 1])
    if args.output_filename is None:

After Change


        print(f"using style noise seed {args.seed_mix} for layers {args.mix_after}-{num_layers}.")
        rnd = np.random.RandomState(args.seed_mix)
        z2 = rnd.randn(batch_size, 512)
        style_noises = [nn.NdArray.from_numpy_array(z)]
        style_noises += [nn.NdArray.from_numpy_array(z2)]
    else:
        // no style mixing (single noise / style is used)
        print(f"using style noise seed {args.seed} for entire layers.")
        style_noises = [nn.NdArray.from_numpy_array(z) for _ in range(2)]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: sony/nnabla-examples
Commit Name: 7d8f3f66495979f1bbd27205d422d673991709f2
Time: 2021-01-26
Author: Krishna.Wadhwani@sony.com
File Name: GANs/stylegan2/generate.py
Class Name:
Method Name: main


Project Name: Unity-Technologies/ml-agents
Commit Name: 9ff52f25147b26f32b951c234b26b92197e19063
Time: 2021-01-11
Author: 54679309+andrewcoh@users.noreply.github.com
File Name: ml-agents/mlagents/trainers/tests/torch/test_attention.py
Class Name:
Method Name: test_simple_transformer_training


Project Name: sony/nnabla-examples
Commit Name: 9dab8ae56ce90f1b9ba6808a6e0673ab6f13103e
Time: 2020-12-15
Author: Krishna.Wadhwani@sony.com
File Name: GANs/stylegan2/generate.py
Class Name:
Method Name: main