def damp(old, new, new_coeff):

    if new_coeff == 1.0:
        return new

    old_coeff = as_floatX(1.) - new_coeff

    new_scaled = new_coeff * new

    old_scaled = old_coeff * old

    rval =  new_scaled + old_scaled

    old_name = make_name(old, anon='anon_old')
    new_name = make_name(new, anon='anon_new')

    rval.name = 'damp( %s, %s)' % (old_name, new_name)

    return rval
Rollback a series of actions then re-raise the exception.
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/models/s3c.py/damp--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/utils.py/UndoManager.rollback_and_reraise