def make_func(self): x = T.TensorType(self.inputs[0]['type'], (False, ) * len(self.inputs[0]['shape']))('x') i = T.TensorType(self.inputs[1]['type'], (False, ) * len(self.inputs[1]['shape']))('y') z = x[i] return links.TheanoFunction([x, i], z)
def make_func(self): import theano.tensor as T x = T.TensorType(self.inputs[0]['type'], (False,) * len(self.inputs[0]['shape']))('x') y = T.TensorType(self.inputs[1]['type'], (False,) * len(self.inputs[1]['shape']))('y') z = x + y return links.TheanoFunction([x, y], [z])
def make_func(self): x = T.TensorType(self.inputs[0]['type'], (False, ) * len(self.inputs[0]['shape']))('x') y = T.TensorType(self.inputs[1]['type'], (False, ) * len(self.inputs[1]['shape']))('y') z = x + y w = x - y return links.TheanoFunction([x, y], [z, w])