

def make_node(self, x, y):
    (x, y) = (as_sparse_variable(x), tensor.as_tensor_variable(y))
    assert (x.format in ['csr', 'csc'])
    out_dtype = scalar.upcast(x.type.dtype, y.type.dtype)
    assert (y.type.ndim == 2)
    return gof.Apply(self, [x, y], [tensor.TensorType(dtype=out_dtype, broadcastable=y.type.broadcastable)()])

dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sparse/basic.py AddSD.make_node/original