コード例 #1
0
        /** @copydoc LayerParameterBase::Clone */
        public override LayerParameterBase Clone()
        {
            EluParameter p = new EluParameter();

            p.Copy(this);
            return(p);
        }
コード例 #2
0
        /** @copydoc LayerParameterBase::Copy */
        public override void Copy(LayerParameterBase src)
        {
            base.Copy(src);

            if (src is EluParameter)
            {
                EluParameter p = (EluParameter)src;
                m_dfAlpha = p.m_dfAlpha;
            }
        }
コード例 #3
0
        /** @copydoc LayerParameterBase::Load */
        public override object Load(System.IO.BinaryReader br, bool bNewInstance = true)
        {
            RawProto     proto = RawProto.Parse(br.ReadString());
            EluParameter p     = FromProto(proto);

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

            return(p);
        }
コード例 #4
0
ファイル: EluParameter.cs プロジェクト: csuffyy/MyCaffe
        /// <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 EluParameter FromProto(RawProto rp)
        {
            string       strVal;
            EluParameter p = new EluParameter();

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

            return(p);
        }
コード例 #5
0
        /// <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 EluParameter FromProto(RawProto rp)
        {
            string       strVal;
            EluParameter p = new EluParameter();

            ((EngineParameter)p).Copy(EngineParameter.FromProto(rp));

            if ((strVal = rp.FindValue("alpha")) != null)
            {
                p.alpha = ParseDouble(strVal);
            }

            return(p);
        }
コード例 #6
0
ファイル: EluParameter.cs プロジェクト: csuffyy/MyCaffe
        /** @copydoc LayerParameterBase::Copy */
        public override void Copy(LayerParameterBase src)
        {
            EluParameter p = (EluParameter)src;

            m_dfAlpha = p.m_dfAlpha;
        }