multilayer prediction, and multiprocessing in python