예제 #1
0
        /** @copydoc LayerParameterBase::Clone */
        public override LayerParameterBase Clone()
        {
            DebugParameter p = new DebugParameter();

            p.Copy(this);
            return(p);
        }
예제 #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 DebugParameter FromProto(RawProto rp)
        {
            string         strVal;
            DebugParameter p = new DebugParameter();

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

            return(p);
        }
예제 #3
0
        /** @copydoc LayerParameterBase::Load */
        public override object Load(System.IO.BinaryReader br, bool bNewInstance = true)
        {
            RawProto       proto = RawProto.Parse(br.ReadString());
            DebugParameter p     = FromProto(proto);

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

            return(p);
        }
예제 #4
0
        /** @copydoc LayerParameterBase::Copy */
        public override void Copy(LayerParameterBase src)
        {
            DebugParameter p = (DebugParameter)src;

            m_nMaxBatchesToStore = p.m_nMaxBatchesToStore;
        }