if self.mode == "sum" or self.mode == "ave":
s = theano.tensor.sum(X, axis=1)
if self.mode == "ave":
s /= X.shape[1]
return s
elif self.mode == "mul":
s = theano.tensor.mul(X, axis=1)
return s
After Change
def get_output(self, train=False):
X = self.get_input(train)
if self.mode == "ave":
s = theano.tensor.mean(X, axis=1)return s
if self.mode == "sum":
s = theano.tensor.sum(X, axis=1)
return s
elif self.mode == "mul":