Modifications to improve test_maxout.py running speed.

config.mode can be DebugMode or DEBUG_MODE. So test it like config.mode in [...]