def squash_range(X):
    """ N x Channel x D signal, make it so each observation,
    channel are between 0 and 1 """
    Xmax    = X.max(axis=2)
    Xmin    = X.min(axis=2)
    Xrange  = Xmax - Xmin
    Xsquash = (X - Xmin[:,:,None]) / Xrange[:,:,None]
    return Xsquash