/** @copydoc LayerParameterBase::Clone */
        public override LayerParameterBase Clone()
        {
            NormalizationParameter p = new NormalizationParameter();

            p.Copy(this);
            return(p);
        }
        /** @copydoc LayerParameterBase::Load */
        public override object Load(System.IO.BinaryReader br, bool bNewInstance = true)
        {
            RawProto proto           = RawProto.Parse(br.ReadString());
            NormalizationParameter p = FromProto(proto);

            if (!bNewInstance)
            {
                Copy(p);
            }

            return(p);
        }
        /// <summary>
        /// Parses the parameter from a RawProto.
        /// </summary>
        /// <param name="rp">Specifies the RawProto to parse.</param>
        /// <returns>A new instance of the parameter is returned.</returns>
        public static NormalizationParameter FromProto(RawProto rp)
        {
            string strVal;
            NormalizationParameter p = new NormalizationParameter();

            if ((strVal = rp.FindValue("norm")) != null)
            {
                if (strVal.ToLower() == Norm.L1.ToString().ToLower())
                {
                    p.m_norm = Norm.L1;
                }
                else
                {
                    p.m_norm = Norm.L2;
                }
            }

            return(p);
        }
        /** @copydoc LayerParameterBase::Copy */
        public override void Copy(LayerParameterBase src)
        {
            NormalizationParameter p = (NormalizationParameter)src;

            m_norm = p.m_norm;
        }