(self, input_shape: list)
Build the layer.
        :param input_shape: the shapes of the input tensors,
            for MatchingLayer we need tow input tensors.
Build the layer.
        :param input_shape: the shapes of the input tensors,
            for MatchingLayer we need tow input tensors.
Build the layer . : param input_shape : the shapes of the input tensors for MatchingLayer we need tow input tensors .
def build(self, input_shape: list):
    """
        Build the layer.
        :param input_shape: the shapes of the input tensors,
            for MatchingLayer we need tow input tensors.
        """
    # Used purely for shape validation.
    if not isinstance(input_shape, list) or len(input_shape) != 2:
      raise ValueError('A `MatchingLayer` layer should be called '
                       'on a list of 2 inputs.')
    self._shape1 = input_shape[0]
    self._shape2 = input_shape[1]
    for idx in 0, 2:
      if self._shape1[idx] != self._shape2[idx]:
        raise ValueError('Incompatible dimensions: '
                         f'{self._shape1[idx]} != {self._shape2[idx]}.'
                         f'Layer shapes: {self._shape1}, {self._shape2}.')
def build ( self , input_shape : list ) : # Used purely for shape validation. if not isinstance ( input_shape , list ) or len ( input_shape ) != 2 : raise ValueError ( 'A `MatchingLayer` layer should be called ' 'on a list of 2 inputs.' ) self . _shape1 = input_shape [ 0 ] self . _shape2 = input_shape [ 1 ] for idx in 0 , 2 : if self . _shape1 [ idx ] != self . _shape2 [ idx ] : raise ValueError ( 'Incompatible dimensions: ' f'{self._shape1[idx]} != {self._shape2[idx]}.' f'Layer shapes: {self._shape1}, {self._shape2}.' )