# Path: tensorflow_model_remediation/common/docs.py
# def _no_op_decorator(obj):
# def _get_safe_decorator(decorator_name):
# 
# Path: tensorflow_model_remediation/common/types.py



import abc
import tensorflow as tf
from typing import Optional
from tensorflow_model_remediation.common import docs
from tensorflow_model_remediation.common import types
    # pyformat: disable
    """Invokes the kernel instance.

    Arguments:
      x: `tf.Tensor` of shape `[N, D]` (if tiling input) or `[N, M, D]` (if not
        tiling input).
      y: Optional `tf.Tensor` of shape `[M, D]` (if tiling input) or `[N, M, D]`
        (if not tiling input).

    If `y` is `None`, it is set to be the same as `x`:

    ```
    if y is None:
      y = x
    ```

    Inputs are tiled if `self.tile_input == True` and left as is otherwise.

    Returns:
      `tf.Tensor` of shape `[N, M]`.
    """
    # pyformat: enable
    if y is None:
      y = x
    if self.tile_input:
      x = x[:, tf.newaxis, :]
      y = y[tf.newaxis, :, :]
    return self.call(x, y)

  @abc.abstractmethod

# Path: tensorflow_model_remediation/common/docs.py
# def _no_op_decorator(obj):
# def _get_safe_decorator(decorator_name):
# 
# Path: tensorflow_model_remediation/common/types.py



# Path: tensorflow_model_remediation/min_diff/losses/kernels/base_kernel.py
import abc
import tensorflow as tf
from typing import Optional
from tensorflow_model_remediation.common import docs
from tensorflow_model_remediation.common import types

    # pyformat: disable
    """Invokes the kernel instance.

    Arguments:
      x: `tf.Tensor` of shape `[N, D]` (if tiling input) or `[N, M, D]` (if not
        tiling input).
      y: Optional `tf.Tensor` of shape `[M, D]` (if tiling input) or `[N, M, D]`
        (if not tiling input).

    If `y` is `None`, it is set to be the same as `x`:

    ```
    if y is None:
      y = x
    ```

    Inputs are tiled if `self.tile_input == True` and left as is otherwise.

    Returns:
      `tf.Tensor` of shape `[N, M]`.
    """
    # pyformat: enable
    if y is None:
      y = x
    if self.tile_input:
      x = x[:, tf.newaxis, :]
      y = y[tf.newaxis, :, :]
    return self.call(x, y)

  @abc.abstractmethod

  @docs.do_not_doc_in_subclasses