class_docstr: Compute MFCC from log-melspectrogram.
  
  It wraps `tf.signal.mfccs_from_log_mel_spectrogram()`, which performs DCT-II.
  
  Note:
      In librosa, the DCT-II scales by `sqrt(1/n)` where `n` is the bin index of MFCC as it uses
      scipy. This is the correct orthogonal DCT.
      In Tensorflow though, because it follows HTK, it scales by `(0.5 * sqrt(2/n))`. This results in
      `sqrt(2)` scale difference in the first MFCC bins (`n=1`).
  
      As long as all of your data in training / inference / deployment is consistent (i.e., do not
      mix librosa and kapre MFCC), it'll be fine!
  
  Args:
      n_mfccs (int): Number of MFCC
      data_format (str): `channels_first`, `channels_last`, or `default`
      **kwargs: optional keyword args for `tf.keras.layers.Layer()`
  
  Example:
      ::
  
          input_shape = (40, 128, 1)  # mono melspectrogram with 40 frames and n_mels=128
          model = Sequential()
          model.add(kapre.LogmelToMFCC(n_mfccs=20, input_shape=input_shape))
          # now the shape is (batch, time=40, n_mfccs=20, ch=1)
docstr: Args:
      log_melgrams (float `Tensor`): a batch of log_melgrams. `(b, time, mel, ch)` if `channels_last`
          and `(b, ch, time, mel)` if `channels_first`.
  
  Returns:
      (float `Tensor`):
      MFCCs. `(batch, time, n_mfccs, ch)` if `channels_last`, `(batch, ch, time, n_mfccs)` if `channels_first`.
docstr_tok: ["Args",":","log_melgrams","(","float","`","Tensor","`",")",":","a","batch","of","log_melgrams",".","`","(","b",",","time",",","mel",",","ch",")","`","if","`","channels_last","`","and","`","(","b",",","ch",",","time",",","mel",")","`","if","`","channels_first","`",".","Returns",":","(","float","`","Tensor","`",")",":","MFCCs",".","`","(","batch",",","time",",","n_mfccs",",","ch",")","`","if","`","channels_last","`",",","`","(","batch",",","ch",",","time",",","n_mfccs",")","`","if","`","channels_first","`","."]
code: def call(self, log_melgrams):
      """
  
      Args:
          log_melgrams (float `Tensor`): a batch of log_melgrams. `(b, time, mel, ch)` if `channels_last`
              and `(b, ch, time, mel)` if `channels_first`.
  
      Returns:
          (float `Tensor`):
          MFCCs. `(batch, time, n_mfccs, ch)` if `channels_last`, `(batch, ch, time, n_mfccs)` if `channels_first`.
      """
      if (
          self.permutation is not None
      ):  # reshape so that last channel == mel
          log_melgrams = K.permute_dimensions(
              log_melgrams, pattern=self.permutation
          )
  
      mfccs = tf.signal.mfccs_from_log_mel_spectrograms(log_melgrams)
      mfccs = mfccs[..., : self.n_mfccs]
  
      if self.permutation is not None:
          mfccs = K.permute_dimensions(mfccs, pattern=self.permutation)
  
      return mfccs
  
imports: import tensorflow
  from tensorflow.keras.layers import Layer
  from tensorflow.keras import backend
  from .None import backend
  from .backend import _CH_FIRST_STR, _CH_LAST_STR, _CH_DEFAULT_STR
label_desc: Use image node_id 2 for calling the LogmelToMFCC obj's underlying member method code with example usage: obj.call(log_melgrams) and returns: mfccs