import tensorflow as tf


    def __init__(self, p=2):
        self._dim = None
        self._p = p

    def _compute(self, x, y):
        self._dim = x._rank()
        kernel = np.zeros((tf.size(x), tf.size(y)))

        for l in tf.range(start=0, limit=tf.size(x), delta=1, dtype=None, name='l_range'):
            for m in tf.range(start=0, limit=tf.size(y), delta=1, dtype=None, name='m_range'):

                vx = tf.contrib.lookup.MutableHashTable(key_dtype=tf.string,
                                                        value_dtype=tf.int64,
