Esempio n. 1
0
    def lmul(self, x):

        reshaped = x.reshape((self.input_groups, x.shape[0] / self.input_groups, x.shape[1], x.shape[2], x.shape[3]))

        out = LocalDot.rmul(self, reshaped)

        return out.reshape((out.shape[0] * out.shape[1], out.shape[2], out.shape[3], out.shape[4]))
Esempio n. 2
0
    def lmul(self, x):

        reshaped = x.reshape(( self.input_groups, x.shape[0] / self.input_groups, x.shape[1], x.shape[2], x.shape[3]))

        out = LocalDot.rmul(self, reshaped)

        return out.reshape((out.shape[0] * out.shape[1], out.shape[2], out.shape[3], out.shape[4]))