

def grad(self, inputs, g):
    (csm,) = inputs
    if isinstance(g[0].type, DisconnectedType):
        return [csm.zeros_like()]
    (data, indices, indptr, shape) = csm_properties(csm)
    return [CSM(csm.format)(g[0], indices, indptr, shape)]

dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sparse/basic.py CSMProperties.grad/original