fix some bugs to make layerwised trainer run

add reset function to reuse the layer ouput dumper
remove test when finish training