Exemplo n.º 1
0
        /** @copydoc EngineParameter::Clone */
        public override LayerParameterBase Clone()
        {
            TanhParameter p = new TanhParameter();

            p.Copy(this);
            return(p);
        }
Exemplo n.º 2
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 TanhParameter FromProto(RawProto rp)
        {
            TanhParameter p = new TanhParameter();

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

            return(p);
        }
Exemplo n.º 3
0
        /** @copydoc EngineParameter::Load */
        public override object Load(System.IO.BinaryReader br, bool bNewInstance = true)
        {
            RawProto      proto = RawProto.Parse(br.ReadString());
            TanhParameter p     = FromProto(proto);

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

            return(p);
        }