2using System.Collections.Generic;
20 [TypeConverter(typeof(ExpandableObjectConverter))]
23 double m_dfPower = 1.0;
24 double m_dfScale = 1.0;
25 double m_dfShift = 0.0;
35 [Description(
"Specifies power value in the formula 'x = (shift + scale * x)^power'.")]
38 get {
return m_dfPower; }
39 set { m_dfPower = value; }
45 [Description(
"Specifies scale value in the formula 'x = (shift + scale * x)^power'.")]
48 get {
return m_dfScale; }
49 set { m_dfScale = value; }
55 [Description(
"Specifies shift value in the formula 'x = (shift + scale * x)^power'.")]
58 get {
return m_dfShift; }
59 set { m_dfShift = value; }
63 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
79 m_dfPower = p.m_dfPower;
80 m_dfScale = p.m_dfScale;
81 m_dfShift = p.m_dfShift;
101 rgChildren.
Add(
"power",
power.ToString());
102 rgChildren.
Add(
"scale",
scale.ToString());
103 rgChildren.
Add(
"shift",
shift.ToString());
105 return new RawProto(strName,
"", rgChildren);
118 if ((strVal = rp.
FindValue(
"power")) !=
null)
121 if ((strVal = rp.
FindValue(
"scale")) !=
null)
124 if ((strVal = rp.
FindValue(
"shift")) !=
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.
The LayerParameterBase is the base class for all other layer specific parameters.
Specifies the parameters for the PowerLayer.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
double power
Specifies power value in the formula .
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
static PowerParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
double scale
Specifies scale value in the formula .
PowerParameter()
Constructor for the parameter.
double shift
Specifies shift value in the formula .
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
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-...