

def perform(self, node, inputs, outputs):
    (alpha, x, y, z) = inputs
    (out,) = outputs
    x_is_sparse = _is_sparse(x)
    y_is_sparse = _is_sparse(y)
    if ((not x_is_sparse) and (not y_is_sparse)):
        raise TypeError(x)
    rval = (x * y)
    if isinstance(rval, scipy.sparse.spmatrix):
        rval = rval.toarray()
    if (rval.dtype == alpha.dtype):
        rval *= alpha
    else:
        rval = (rval * alpha)
    if (rval.dtype == z.dtype):
        rval += z
    else:
        rval = (rval + z)
    out[0] = rval

dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sparse/basic.py Usmm.perform/original