parameters: (input_shape, param_name, func_name, target_shape)
return_statement: return True
docstring: Check the input shape's is equal to the expected shape
          :param input_shape(list): a list of the tensor shapes.
          :param param_name(str): the name of the checked parameter.
          :param func_name(str): the name of the function.
          :param target_shape: the expected shape.
          :return:
docstring_summary: Check the input shape's is equal to the expected shape
          :param input_shape(list): a list of the tensor shapes.
          :param param_name(str): the name of the checked parameter.
          :param func_name(str): the name of the function.
          :param target_shape: the expected shape.
          :return:
docstring_tokens: Check the input shape s is equal to the expected shape : param input_shape ( list ) : a list of the tensor shapes . : param param_name ( str ) : the name of the checked parameter . : param func_name ( str ) : the name of the function . : param target_shape : the expected shape . : return :
function: def check_shape_equal(input_shape, param_name, func_name, target_shape):
          """
          Check the input shape's is equal to the expected shape
          :param input_shape(list): a list of the tensor shapes.
          :param param_name(str): the name of the checked parameter.
          :param func_name(str): the name of the function.
          :param target_shape: the expected shape.
          :return:
          """
          if not isinstance(target_shape[0], list):
              target_shape = [target_shape]
          if isinstance(input_shape, tuple):
              input_shape = list(input_shape)
          _LayerInputCheck.check_shape_length(input_shape, param_name, func_name,
                                              [len(item) for item in target_shape])
          matched = False
          for item in target_shape:
              if item == input_shape:
                  matched = True
                  break
  
          if not matched:
              raise ValueError(f"{func_name} {param_name} shape should be one of {target_shape},"
                               f"but got {input_shape}")
          return True
function_tokens: def check_shape_equal ( input_shape , param_name , func_name , target_shape ) : if not isinstance ( target_shape [ 0 ] , list ) : target_shape = [ target_shape ] if isinstance ( input_shape , tuple ) : input_shape = list ( input_shape ) _LayerInputCheck . check_shape_length ( input_shape , param_name , func_name , [ len ( item ) for item in target_shape ] ) matched = False for item in target_shape : if item == input_shape : matched = True break if not matched : raise ValueError ( f"{func_name} {param_name} shape should be one of {target_shape}," f"but got {input_shape}" ) return True