Utilities for Pylearn