use pybrain to implement train and test process
add debug function