/** @copydoc EngineParameter::Clone */ public override LayerParameterBase Clone() { ClipParameter p = new ClipParameter(); p.Copy(this); 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 ClipParameter FromProto(RawProto rp) { string strVal; ClipParameter p = new ClipParameter(); p.Copy(EngineParameter.FromProto(rp)); if ((strVal = rp.FindValue("min")) != null) { p.min = double.Parse(strVal); } if ((strVal = rp.FindValue("max")) != null) { p.max = double.Parse(strVal); } return(p); }