try pylearn2's NanGuardMode