2using System.Collections.Generic;
29 [TypeConverter(typeof(ExpandableObjectConverter))]
32 double m_dfLowerBound = 0.0;
33 double m_dfUpperBound = 1.0;
34 double m_dfAlpha = 10.0;
35 double m_dfMaxIter = 1;
45 [Description(
"Specifies the lower bound of the height used for scaling.")]
48 get {
return m_dfLowerBound; }
49 set { m_dfLowerBound = value; }
55 [Description(
"Specifies the upper bound of the height used for scaling.")]
58 get {
return m_dfUpperBound; }
59 set { m_dfUpperBound = value; }
65 [Description(
"Specifies the alpha value applied to the current iter/max_iter, used when scaling.")]
68 get {
return m_dfAlpha; }
69 set { m_dfAlpha = value; }
75 [Description(
"Specifies the maximum iteration used when scaling.")]
78 get {
return m_dfMaxIter; }
79 set { m_dfMaxIter = value; }
88 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
106 m_dfLowerBound = p.m_dfLowerBound;
107 m_dfUpperBound = p.m_dfUpperBound;
108 m_dfAlpha = p.m_dfAlpha;
109 m_dfMaxIter = p.m_dfMaxIter;
134 rgChildren.
Add(
"alpha",
alpha.ToString());
137 return new RawProto(strName,
"", rgChildren);
150 if ((strVal = rp.
FindValue(
"lower_bound")) !=
null)
153 if ((strVal = rp.
FindValue(
"upper_bound")) !=
null)
156 if ((strVal = rp.
FindValue(
"alpha")) !=
null)
159 if ((strVal = rp.
FindValue(
"max_iter")) !=
null)
static double ParseDouble(string strVal)
Parse double values using the US culture if the decimal separator = '.', then using the native cultur...
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.
static RawProto Parse(string str)
Parses a prototxt and places it in a new RawProto.
string FindValue(string strName)
Searches for a falue of a node within this nodes children.
Specifies the parameters for the GradientScaleLayer.
double lower_bound
Specifies the lower bound of the height used for scaling.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
double alpha
Specifies the alpha value applied to the current iter/max_iter, used when scaling.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
double max_iter
Specifies the maximum iteration used when scaling.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
GradientScaleParameter()
Constructor for the parameter.
static GradientScaleParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
double upper_bound
Specifies the upper bound of the height used for scaling.
The LayerParameterBase is the base class for all other layer specific parameters.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.param namespace contains parameters used to create models.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...