modified mvn_layer.cpp