2using System.Collections.Generic;
7using System.Threading.Tasks;
20 [TypeConverter(typeof(ExpandableObjectConverter))]
23 float m_fFraction = 0;
24 List<float> m_rgValue =
new List<float>();
37 [Description(
"Get/set the percentage of pixels.")]
40 get {
return m_fFraction; }
41 set { m_fFraction =
value; }
47 [Description(
"Get/set the values.")]
50 get {
return m_rgValue; }
51 set { m_rgValue =
value; }
66 m_rgValue =
new List<float>();
68 foreach (
float fVal
in p.value)
93 RawProto rpBase = base.ToProto(
"option");
96 rgChildren.
Add(rpBase);
98 rgChildren.
Add(
new RawProto(
"fraction", m_fFraction.ToString()));
100 foreach (
float fVal
in m_rgValue)
102 rgChildren.Add(
new RawProto(
"value", fVal.ToString()));
105 return new RawProto(strName,
"", rgChildren);
119 if (rpOption !=
null)
122 if ((strVal = rp.
FindValue(
"fraction")) !=
null)
125 p.
value =
new List<float>();
129 if ((strVal = rp.FindValue(
"value")) !=
null)
The BaseParameter class is the base class for all other parameter classes.
static float ParseFloat(string strVal)
Parse float values using the US culture if the decimal separator = '.', then using the native culture...
The RawProtoCollection class is a list of RawProto objects.
void Add(RawProto p)
Adds a RawProto to the collection.
The RawProto class is used to parse and output Google prototxt file data.
RawProto FindChild(string strName)
Searches for a given node.
string FindValue(string strName)
Searches for a falue of a node within this nodes children.
RawProtoCollection FindChildren(params string[] rgstrName)
Searches for all children with a given name in this node's children.
The OptionalParameter is the base class for parameters that are optional such as the MaskParameter,...
static OptionalParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
OptionalParameter(bool bActive=false)
The constructor.
bool Active
When active, the parameter is used, otherwise it is ignored.
Specifies the parameters for the SaltPepperParameter used with SSD.
override RawProto ToProto(string strName)
Convert this object to a raw proto.
SaltPepperParameter Clone()
Return a clone of the object.
static new SaltPepperParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
SaltPepperParameter(bool bActive)
The constructor.
float fraction
Get/set the percentage of pixels.
override void Copy(OptionalParameter src)
Copy the object.
List< float > value
Get/set the values.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.param.ssd namespace contains all SSD related parameter objects that correspond to the nat...
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...