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

            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());
            ScaleParameter p     = FromProto(proto);

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

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

            base.Copy(src);

            m_bBiasTerm = p.m_bBiasTerm;

            if (p.m_FillerBias != null)
            {
                m_FillerBias = p.m_FillerBias.Clone();
            }
        }
        /// <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 new ScaleParameter FromProto(RawProto rp)
        {
            string         strVal;
            ScaleParameter p = new ScaleParameter();

            if ((strVal = rp.FindValue("bias_term")) != null)
            {
                p.bias_term = bool.Parse(strVal);
            }

            RawProto rpBiasFiller = rp.FindChild("bias_filler");

            if (rpBiasFiller != null)
            {
                p.bias_filler = FillerParameter.FromProto(rpBiasFiller);
            }

            return(p);
        }