def stft_norm2(X):
 X2 = (X * X.conj()).real
 norms2 = (((2.0 * X2.sum(axis=2).sum(axis=1)) - np.sum(X2[:, 0, :], axis=1)) - np.sum(X2[:, (-1), :], axis=1))
 return norms2

def stft_norm2 ( X ) : X2 = ( X * X . conj ( ) ) . real norms2 = ( ( ( 2.0 * X2 . sum ( axis = 2 ) . sum ( axis = 1 ) ) - np . sum ( X2 [ : , 0 , : ] , axis = 1 ) ) - np . sum ( X2 [ : , ( - 1 ) , : ] , axis = 1 ) ) return norms2
compute l2 norm of stft transform .