#%%
from matplotlib import pyplot as plt

import keras

from eva.layers.masked_convolution2d import MaskedConvolution2D
from eva.layers.color_extract import ColorExtract

from eva.util.mutil import infer
from eva.util.nutil import to_rgb

model = keras.models.load_model('eva/examples/pixelcnn.h5', custom_objects={'MaskedConvolution2D':MaskedConvolution2D, 'ColorExtract':ColorExtract})

for image in [infer(model) for _ in range(count)]:
    plt.imshow(image, interpolation='nearest')
    plt.show()

@@ -200,42 +200,29 @@
 nfer
-%0Afrom eva.util.nutil import to_rgb
+, generate%0A%0Acount = 1
 %0A%0Amo
@@ -269,16 +269,13 @@
 les/
-pixelcnn
+model
 .h5'
@@ -337,38 +337,392 @@
 on2D
-, 'ColorExtract':ColorExtract%7D
+%7D)%0A%0Amodel.get_layer(index=-7).get_weights()%5B0%5D.shape%0A%0A#%25%25%0Aimport numpy as np #RRR%0Apixels = np.zeros(shape=model.input_shape%5B1:%5D)%0Ap = model.predict_on_batch(pixels%5Bnp.newaxis%5D)%0At = np.zeros(256)%0A%0Afor c in p:%0A    for i in c%5B0%5D:%0A        t%5Bnp.argmax(i)%5D += 1%0A%0Aprint(t)%0A%0A#%25%25%0Afor image in %5Bgenerate(model) for _ in range(count)%5D:%0A    plt.imshow(image, interpolation='nearest')%0A    plt.show(
 )%0A%0Af

Add infer jupyter debugging info