added intermediate-layer output