266090580c44c480d559a15ce2df012eb401adb6,deepctr/layers/interaction.py,BilinearInteraction,call,#BilinearInteraction#,1019

Before Change


                "Unexpected inputs dimensions %d, expect to be 3 dimensions" % (K.ndim(inputs)))

        if self.bilinear_type == "all":
            p = [tf.multiply(tf.tensordot(v_i, self.W, axes=(-1, 0)), v_j)
                 for v_i, v_j in itertools.combinations(inputs, 2)]
        elif self.bilinear_type == "each":
            p = [tf.multiply(tf.tensordot(inputs[i], self.W_list[i], axes=(-1, 0)), inputs[j])
                 for i, j in itertools.combinations(range(len(inputs)), 2)]

After Change


            p = [tf.multiply(vidots[i], inputs[j]) for i, j in itertools.combinations(range(n), 2)]
        elif self.bilinear_type == "each":
            vidots = [tf.tensordot(inputs[i], self.W_list[i], axes=(-1, 0)) for i in range(n - 1)]
            p = [tf.multiply(vidots[i], inputs[j]) for i, j in itertools.combinations(range(n), 2)]
        elif self.bilinear_type == "interaction":
            p = [tf.multiply(tf.tensordot(v[0], w, axes=(-1, 0)), v[1])
                 for v, w in zip(itertools.combinations(inputs, 2), self.W_list)]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: shenweichen/DeepCTR
Commit Name: 266090580c44c480d559a15ce2df012eb401adb6
Time: 2020-07-18
Author: iofficium@163.com
File Name: deepctr/layers/interaction.py
Class Name: BilinearInteraction
Method Name: call


Project Name: Esri/raster-functions
Commit Name: d40ecc90c80ded43a98d23e0e46b5f5e849f02c5
Time: 2014-08-26
Author: akferoz@esri.com
File Name: ReferenceTemplate.py
Class Name: ReferenceFunction
Method Name: updatePixels


Project Name: LCAV/pyroomacoustics
Commit Name: a0055917b6f6a35cd114c49bf0c75b07d7c9bb10
Time: 2018-05-26
Author: eric.bezzam@epfl.ch
File Name: pyroomacoustics/realtime/dft.py
Class Name: DFT
Method Name: analysis