class_docstr: Keras test
class_docstr_tok: ["Keras","test"]
docstr: test_forward_concatenate
docstr_tok: ["test_forward_concatenate"]
code: def test_forward_concatenate(self, keras_mod):
      """test_forward_concatenate"""
      data1 = keras_mod.layers.Input(shape=(1, 2, 2))
      data2 = keras_mod.layers.Input(shape=(1, 1, 2))
      merge_func = keras_mod.layers.Concatenate(axis=2)
      out = merge_func([data1, data2])
      keras_model = keras_mod.models.Model([data1, data2], out)
      verify_keras_frontend(keras_model, layout="NHWC")
      verify_keras_frontend(keras_model, layout="NCHW")
      # test default axis (e.g., -1)
      data1 = keras_mod.layers.Input(shape=(1, 2, 2))
      data2 = keras_mod.layers.Input(shape=(1, 2, 3))
      merge_func = keras_mod.layers.Concatenate()
      out = merge_func([data1, data2])
      keras_model = keras_mod.models.Model([data1, data2], out)
      verify_keras_frontend(keras_model, layout="NHWC")
      verify_keras_frontend(keras_model, layout="NCHW")
      # test axis at last dimension
      data1 = keras_mod.layers.Input(shape=(1, 2, 2))
      data2 = keras_mod.layers.Input(shape=(1, 2, 3))
      merge_func = keras_mod.layers.Concatenate(axis=3)
      out = merge_func([data1, data2])
      keras_model = keras_mod.models.Model([data1, data2], out)
      verify_keras_frontend(keras_model, layout="NHWC")
      verify_keras_frontend(keras_model, layout="NCHW")
  
imports: from packaging import version
  import numpy
  from tensorflow import keras
  import keras
  import pytest
  import tvm
  from tvm import relay
  from tvm.contrib import graph_executor
  import tvm.testing
label_desc: Use image node_id 2 for calling the TestKeras obj's underlying member method code with example usage: obj.test_forward_concatenate(keras_mod) without return types