The diff makes this confusing, but I didn't actually touch the corruption_free_energy function. Here's the same function in the master branch: https://github.com/lisa-lab/pylearn2/blob/master/pylearn2/corruption.py#L154