(self, stfts)
return tf.concat(
        [logmag[:, :, :, tf.newaxis], p[:, :, :, tf.newaxis]], axis=-1)
Converts stfts to specgrams.

    Args:
      stfts: Complex64 tensor of stft, shape [batch, time, freq, 1].

    Returns:
      specgrams: Tensor of log magnitudes and instantaneous frequencies,
        shape [batch, time, freq, 2].
Converts stfts to specgrams.
Converts stfts to specgrams .
def stfts_to_specgrams(self, stfts):
    """Converts stfts to specgrams.

    Args:
      stfts: Complex64 tensor of stft, shape [batch, time, freq, 1].

    Returns:
      specgrams: Tensor of log magnitudes and instantaneous frequencies,
        shape [batch, time, freq, 2].
    """
    stfts = stfts[:, :, :, 0]

    logmag = self._safe_log(tf.abs(stfts))

    phase_angle = tf.angle(stfts)
    if self._ifreq:
      p = spectral_ops.instantaneous_frequency(phase_angle)
    else:
      p = phase_angle / np.pi

    return tf.concat(
        [logmag[:, :, :, tf.newaxis], p[:, :, :, tf.newaxis]], axis=-1)
def stfts_to_specgrams ( self , stfts ) : stfts = stfts [ : , : , : , 0 ] logmag = self . _safe_log ( tf . abs ( stfts ) ) phase_angle = tf . angle ( stfts ) if self . _ifreq : p = spectral_ops . instantaneous_frequency ( phase_angle ) else : p = phase_angle / np . pi return tf . concat ( [ logmag [ : , : , : , tf . newaxis ] , p [ : , : , : , tf . newaxis ] ] , axis = - 1 )