420747a2f5f6f23b84f62f9a00481ef53a4a4623,train.py,,sample_from_model,#,82

Before Change


    assert len(obs_shape) == 3, "assumed right now"
    for yi in range(obs_shape[0]):
        for xi in range(obs_shape[1]):
            new_x_gen_np = sess.run(new_x_gen, {x_sample: x_gen})
            x_gen[:,yi,xi,:] = new_x_gen_np[:,yi,xi,:].copy()
    return x_gen

// get loss gradients over multiple GPUs

After Change


    x_gen = [np.zeros((args.batch_size,) + obs_shape, dtype=np.float32) for i in range(args.nr_gpu)]
    for yi in range(obs_shape[0]):
        for xi in range(obs_shape[1]):
            new_x_gen_np = sess.run(new_x_gen, {xs[i]: x_gen[i] for i in range(args.nr_gpu)})
            for i in range(args.nr_gpu):
                x_gen[i][:,yi,xi,:] = new_x_gen_np[i][:,yi,xi,:]
    return np.concat(x_gen, axis=0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: openai/pixel-cnn
Commit Name: 420747a2f5f6f23b84f62f9a00481ef53a4a4623
Time: 2016-11-11
Author: tim@Tims-MacBook-Pro.local
File Name: train.py
Class Name:
Method Name: sample_from_model


Project Name: astorfi/TensorFlow-World
Commit Name: 4d0d3c160b36f461ef61b33c3200c600801abc0f
Time: 2017-06-14
Author: amirsina.torfi@gmail.com
File Name: codes/3-neural_networks/convolutional-neural-network/code/train_evaluation.py
Class Name:
Method Name: evaluation


Project Name: marcoancona/DeepExplain
Commit Name: 83796ff9a1dcae49dd13f3ce67157f756d28803e
Time: 2017-11-02
Author: marco.ancona@inf.ethz.ch
File Name: example_tf.py
Class Name: DeepExplain
Method Name: explain