modified TanHLayer