def norm_l21_tf(Z, shape, n_orient):
 if Z.shape[0]:
  Z2 = Z.reshape(*shape)
  l21_norm = np.sqrt(stft_norm2(Z2).reshape((-1), n_orient).sum(axis=1))
  l21_norm = l21_norm.sum()
 else:
  l21_norm = 0.0
 return l21_norm

def norm_l21_tf ( Z , shape , n_orient ) : if Z . shape [ 0 ] : Z2 = Z . reshape ( * shape ) l21_norm = np . sqrt ( stft_norm2 ( Z2 ) . reshape ( ( - 1 ) , n_orient ) . sum ( axis = 1 ) ) l21_norm = l21_norm . sum ( ) else : l21_norm = 0.0 return l21_norm
l21 norm for tf .