def show_negative_chains(model_path):
    model = serial.load(model_path)

    try:
        control.push_load_data(False)
        dataset = yaml_parse.load(model.dataset_yaml_src)
    finally:
        control.pop_load_data()

    try:
        layer_to_chains = model.layer_to_chains
    except AttributeError:
        print("This model doesn't have negative chains.")
        quit(-1)

    vis_chains = get_vis_chains(layer_to_chains, model, dataset)

    m = vis_chains.shape[0]
    grid_shape = get_grid_shape(m)

    return create_patch_viewer(grid_shape, vis_chains, m)
Display negative chains.
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/scripts/dbm/show_negative_chains.py/show_negative_chains