Modifications to improve test_maxout.py running speed.

idem