def make_visual(layer_weights):
    max_scale = layer_weights.max(axis=-1).max(axis=-1)[...,
                                                        np.newaxis, np.newaxis]
    min_scale = layer_weights.min(axis=-1).min(axis=-1)[...,
                                                        np.newaxis, np.newaxis]
    return (255 * (min_scale - layer_weights) /
            (max_scale - min_scale)).astype('uint8')
dataset/ETHPy150Open sklearn-theano/sklearn-theano/examples/plot_overfeat_layer1_filters.py/make_visual/swapped operands of `-`