f23f2ff2c96537274beb99aca8417f054f817501,examples/neural_style_transfer.py,,,#,282

Before Change


// so as to minimize the neural style loss
x = np.random.uniform(0, 255, (1, 3, img_width, img_height))
x[0, 0, :, :] -= 103.939
x[0, 1, :, :] -= 116.779
x[0, 2, :, :] -= 123.68
for i in range(10):
    print("Start of iteration", i)

After Change



// run scipy-based optimization (L-BFGS) over the pixels of the generated image
// so as to minimize the neural style loss
if K.image_dim_ordering() == "th":
    x = np.random.uniform(0, 255, (1, 3, img_width, img_height)) - 128.
else:
    x = np.random.uniform(0, 255, (1, img_width, img_height, 3)) - 128.

for i in range(10):
    print("Start of iteration", i)
    start_time = time.time()
    x, min_val, info = fmin_l_bfgs_b(evaluator.loss, x.flatten(),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: keras-team/keras
Commit Name: f23f2ff2c96537274beb99aca8417f054f817501
Time: 2016-08-27
Author: francois.chollet@gmail.com
File Name: examples/neural_style_transfer.py
Class Name:
Method Name:


Project Name: keras-team/keras
Commit Name: cc92025fdc862e00cf787cc309c741e8944ed0a7
Time: 2016-09-06
Author: francois.chollet@gmail.com
File Name: examples/mnist_cnn.py
Class Name:
Method Name:


Project Name: keras-team/keras
Commit Name: 8fab33c245208f9c39f55292af9773574d891a16
Time: 2016-09-30
Author: francois.chollet@gmail.com
File Name: examples/variational_autoencoder_deconv.py
Class Name:
Method Name: