

def test_sample_supervised(idxs=None, noisy=True):
    '\n    Visualize samples and labels produced by GSN.\n    '
    with open('gsn_sup_example.pkl') as f:
        gsn = pickle.load(f)
    gsn._corrupt_switch = noisy
    ds = MNIST(which_set='test')
    if (idxs is None):
        data = ds.X[100:150]
    else:
        data = ds.X[idxs]
    samples = gsn.get_samples([(0, data)], indices=[0, 2], walkback=21, symbolic=False, include_first=True)
    stacked = vis_samples(tiled)
    tiled = image.tile_raster_images(stacked, img_shape=[28, 28], tile_shape=[50, 50], tile_spacing=(2, 2))
    image.save('gsn_sup_example.png', tiled)

dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/scripts/gsn_example.py test_sample_supervised/VarMisuse@127/184 `samples`->`tiled`