fixed example files according to new api
fixed syntax error
moving hidden layer-specific functions
lecun tanh