class_docstr: Addes a frequency information channel to spectrograms.
  
  The added frequency channel (=frequency map) has a linearly increasing values from 0.0 to 1.0,
  indicating the normalize frequency of a time-frequency bin. This layer can be applied to input audio spectrograms
  or any feature maps so that the following layers can be conditioned on the frequency. (Imagine something like
  positional encoding in NLP but the position is on frequency axis).
  
  A combination of `ConcatenateFrequencyMap` and `Conv2D` is known as frequency-aware convolution (see References).
  For your convenience, such a layer is supported by `karep.composed.get_frequency_aware_conv2d()`.
  
  Args:
      data_format (str): specifies the data format of batch input/output.
      **kwargs: Keyword args for the parent keras layer (e.g., `name`)
  
  Example:
      ::
  
          input_shape = (2048, 1)  # mono signal
          model = Sequential()
          model.add(kapre.STFT(n_fft=1024, hop_length=512, input_shape=input_shape))
          model.add(kapre.Magnitude())
          # (batch, n_frame=3, n_freq=513, ch=1) and dtype is float
          model.add(kapre.ConcatenateFrequencyMap())
          # (batch, n_frame=3, n_freq=513, ch=2)
          # now add your model
          mode.add(keras.layers.Conv2D(16, (3, 3), strides=(2, 2), activation='relu')
          # you can concatenate frequency map before other conv layers,
          # but probably, you wouldn't want to add it right before batch normalization.
          model.add(kapre.ConcatenateFrequencyMap())
          model.add(keras.layers.Conv2D(32, (3, 3), strides=(1, 1), activation='relu')
          model.add(keras.layers.MaxPooling2D((2, 2)))  # length of frequency axis doesn't matter
  
  References:
      Koutini, K., Eghbal-zadeh, H., & Widmer, G. (2019).
      `Receptive-Field-Regularized CNN Variants for Acoustic Scene Classification <https://arxiv.org/abs/1909.02859>`_.
      In Proceedings of the Detection and Classification of Acoustic Scenes and Events 2019 Workshop (DCASE2019).
class_docstr_tok: ["Addes","a","frequency","information","channel","to","spectrograms",".","The","added","frequency","channel","(","=frequency","map",")","has","a","linearly","increasing","values","from","0.0","to","1.0",",","indicating","the","normalize","frequency","of","a","time-frequency","bin",".","This","layer","can","be","applied","to","input","audio","spectrograms","or","any","feature","maps","so","that","the","following","layers","can","be","conditioned","on","the","frequency",".","(","Imagine","something","like","positional","encoding","in","NLP","but","the","position","is","on","frequency","axis",")",".","A","combination","of","`","ConcatenateFrequencyMap","`","and","`","Conv2D","`","is","known","as","frequency-aware","convolution","(","see","References",")",".","For","your","convenience",",","such","a","layer","is","supported","by","`","karep.composed.get_frequency_aware_conv2d","(",")","`",".","Args",":","data_format","(","str",")",":","specifies","the","data","format","of","batch","input\/output",".","*","*","kwargs",":","Keyword","args","for","the","parent","keras","layer","(","e.g.",",","`","name","`",")","Example",":",":",":","input_shape","=","(","2048",",","1",")","#","mono","signal","model","=","Sequential","(",")","model.add","(","kapre.STFT","(","n_fft=1024",",","hop_length=512",",","input_shape=input_shape",")",")","model.add","(","kapre.Magnitude","(",")",")","#","(","batch",",","n_frame=3",",","n_freq=513",",","ch=1",")","and","dtype","is","float","model.add","(","kapre.ConcatenateFrequencyMap","(",")",")","#","(","batch",",","n_frame=3",",","n_freq=513",",","ch=2",")","#","now","add","your","model","mode.add","(","keras.layers.Conv2D","(","16",",","(","3",",","3",")",",","strides=","(","2",",","2",")",",","activation='relu","'",")","#","you","can","concatenate","frequency","map","before","other","conv","layers",",","#","but","probably",",","you","would","n't","want","to","add","it","right","before","batch","normalization",".","model.add","(","kapre.ConcatenateFrequencyMap","(",")",")","model.add","(","keras.layers.Conv2D","(","32",",","(","3",",","3",")",",","strides=","(","1",",","1",")",",","activation='relu","'",")","model.add","(","keras.layers.MaxPooling2D","(","(","2",",","2",")",")",")","#","length","of","frequency","axis","does","n't","matter","References",":","Koutini",",","K.",",","Eghbal-zadeh",",","H.",",","&","Widmer",",","G.","(","2019",")",".","`","Receptive-Field-Regularized","CNN","Variants","for","Acoustic","Scene","Classification","<","https",":","\/\/arxiv.org\/abs\/1909.02859",">","`","_",".","In","Proceedings","of","the","Detection","and","Classification","of","Acoustic","Scenes","and","Events","2019","Workshop","(","DCASE2019",")","."]
code: def __init__(self, data_format="default", **kwargs):
      backend.validate_data_format_str(data_format)
  
      if data_format == _CH_DEFAULT_STR:
          self.data_format = K.image_data_format()
      else:
          self.data_format = data_format
  
      self.data_format = data_format
  
      super(ConcatenateFrequencyMap, self).__init__(**kwargs)
  
imports: import tensorflow
  from tensorflow.keras import backend
  from tensorflow.keras.layers import Layer
  from .None import backend
  from .backend import _CH_FIRST_STR, _CH_LAST_STR, _CH_DEFAULT_STR
  from .tflite_compatible_stft import atan2_tflite
label_desc: Use image node_id 1 to create a new ConcatenateFrequencyMap object from inherited base classes: Layer with example: obj = ConcatenateFrequencyMap(data_format)