add trainer interface
add BasicCortex
remove debug noise
fix bug when deserializing tanh activation function