def get_subquantizer_distances(self, x, coarse_codes, coarse_split=None):

        px = self.project(x, coarse_codes)
        subquantizer_dists = []

        if coarse_split is None:
            split_iter = iterate_splits(px, self.num_coarse_splits)
        else:
            split_iter = [(np.split(px, self.num_coarse_splits)[coarse_split], coarse_split)]

        # for cx, split in iterate_splits(px, self.num_coarse_splits):
        for cx, split in split_iter:
            _, _, _, subC = self.get_split_parameters(split)
            subquantizer_dists += [((fx - subC[sub_split]) ** 2).sum(axis=1) for fx, sub_split in iterate_splits(cx, self.num_fine_splits)]

        return subquantizer_dists
Multiplies 2 tensors.
dataset/ETHPy150Open yahoo/lopq/python/lopq/model.py/LOPQModel.get_subquantizer_distances--crossover with--dataset/ETHPy150Open fchollet/keras/keras/backend/tensorflow_backend.py/dot