def make_grid(grid_sidelen, imagevecs):
    im_sidelen = int(np.sqrt(imagevecs.shape[1]))
    shape = 2*(grid_sidelen,) + 2*(im_sidelen,)
    reshaped = imagevecs.reshape(shape)

    return np.vstack(
        [np.hstack([reshape_square(img) for img in col]) for col in reshaped])
Example #2
0
 def draw(x, y):
     vec[dims] = (x,y)
     return reshape_square(decode(vec))
 def draw(x, y):
     vec[dims] = (x,y)
     return reshape_square(decode(vec))