def make_node(self, x): x = T.as_tensor_variable(x) out = x.type() return Apply(self, [x], [out])
def make_node(self, x): x = as_tensor_variable(x) assert x.ndim == 2 w = theano.tensor.vector(dtype=x.dtype) v = theano.tensor.matrix(dtype=x.dtype) return Apply(self, [x], [w, v])
def make_node(self, x): x = as_tensor_variable(x) assert x.ndim == 2 return Apply(self, [x], [x.type()])
def make_node(self, x): x = tensor.as_tensor_variable(x) return Apply(self, [x], [x.type()])
def make_node(self, _x): x = as_tensor_variable(_x) if x.type.ndim != 1: raise TypeError('AllocDiag only works on vectors', _x) return Apply(self, [x], [theano.tensor.matrix(dtype=x.type.dtype)])
def make_node(self, imgs): ffts_type = CudaNdarrayType((False, False, False, False)) ffts = ffts_type() return Apply(self, [imgs], [ffts])
def make_node(self, xin): xout = xin.type.make_variable() return Apply(op=self, inputs=[xin], outputs=[xout])
def make_node(self, a, b): a = as_tensor_variable(a) b = as_tensor_variable(b) out_dtype = theano.scalar.upcast(a.dtype, b.dtype) x = theano.tensor.matrix(dtype=out_dtype) return Apply(self, [a, b], [x])
def make_node(self, x, toAppend): assert isinstance(x.type, TypedListType) assert x.type == toAppend.type return Apply(self, [x, toAppend], [x.type()])
def make_node(self, _x): x = as_tensor_variable(_x) if x.type.ndim != 2: raise TypeError('ExtractDiag only works on matrices', _x) return Apply(self, [x], [tensor.vector(dtype=x.type.dtype)])
def make_node(self, a): a = as_tensor_variable(a) out = a.type() return Apply(self, [a], [out])
def make_node(self, x): x = T.as_tensor_variable(x) if x.type.ndim != 4: raise TypeError('U2IElemwiseSum inputs should be 4-dim tensor') return Apply(self, [x], [x.type()])
def make_node(self, x): x = T.as_tensor_variable(x) if x.type.ndim != 4: raise TypeError('Input should be a 4-dim variable.') return Apply(self, [x], [x.type()])
def make_node(self, x, gz): out = x.type() return Apply(self, [x, gz], [out])
def make_node(self, x): x = T.as_tensor_variable(x) o = T.scalar(dtype=x.dtype) return Apply(self, [x], [o])
def make_node(self, x, toRemove): assert isinstance(x.type, TypedListType) assert x.ttype == toRemove.type return Apply(self, [x, toRemove], [x.type()])
def make_node(self, a, b): c_type = CudaNdarrayType((False,)) c = c_type() return Apply(self, [a, b], [c])
def make_node(self, x): assert isinstance(x.type, TypedListType) return Apply(self, [x], [x.type()])
def make_node(self, in1, in2): out = CudaNdarrayType((False, False, False, False)) return Apply(self, [in1, in2], [out()])
def make_node(self, x, elem): assert isinstance(x.type, TypedListType) assert x.ttype == elem.type return Apply(self, [x, elem], [T.scalar()])
def make_node(self, x, i0, i1, amt): _i0 = tensor.as_tensor_variable(i0) _i1 = tensor.as_tensor_variable(i1) return Apply(self, [x, _i0, _i1, amt], [x.type()])
def make_node(self, x): assert isinstance(x.type, TypedListType) return Apply(self, [x], [T.scalar(dtype='int64')])
def make_node(self, input): input = scalar.as_scalar(input) output = input.type() return Apply(self, [input], [output])
def make_node(self, *inputs): # Checking if arguments are of the right type is done in the scan # function out_types = [out.type() for out in self.outputs] return Apply(self, inputs, out_types)
def make_node(self, x): x = as_tensor_variable(x) assert x.ndim == 2 o = theano.tensor.scalar(dtype=x.dtype) return Apply(self, [x], [o])
def make_node(self, c1, t1, c2, t2, c3, t3, f3): assert t1.type == f3.type assert t2.type == t3.type assert t3.type == f3.type return Apply(self, [c1, t1, c2, t2, c3, t3, f3], [t1.type()])
def make_node(self, x): x = as_tensor_variable(x) assert x.ndim == 2, "The input of qr function should be a matrix." q = theano.tensor.matrix(dtype=x.dtype) return Apply(self, [x], [q])
def make_node(self, x): return Apply(self, [x], [x.type()])
def make_node(self, x): assert imported_scipy, ( "Scipy not available. Scipy is needed for the Cholesky op") x = as_tensor_variable(x) assert x.ndim == 2 return Apply(self, [x], [x.type()])
def make_node(self, *inputs): alpha = as_tensor_variable(inputs[0]) xt = as_tensor_variable(inputs[1]) xf = as_tensor_variable(inputs[2]) ll = as_tensor_variable(.1) return Apply(self, [alpha, xt, xf], [ll.type()])