removed the enable_pooling part.
Added the flag to determine to whether the task is classification or detection.
Added the new layer code.