示例#1
0
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])
示例#2
0
 def draw(x, y):
     vec[dims] = (x,y)
     return reshape_square(decode(vec))
示例#3
0
 def draw(x, y):
     vec[dims] = (x,y)
     return reshape_square(decode(vec))