2using System.Collections.Generic;
24 [TypeConverter(typeof(ExpandableObjectConverter))]
27 double m_dfBase = -1.0;
28 double m_dfScale = 1.0;
29 double m_dfShift = 0.0;
39 [Description(
"Specifies the base to use for the exponent, where 'y = base ^ (shift + scale * x), for base > 0'.")]
42 get {
return m_dfBase; }
43 set { m_dfBase = value; }
49 [Description(
"Specifies the scale to use for the exponent, where 'y = base ^ (shift + scale * x), for base > 0'.")]
52 get {
return m_dfScale; }
53 set { m_dfScale = value; }
59 [Description(
"Specifies the shift to use for the exponent, where 'y = base ^ (shift + scale * x), for base > 0'.")]
62 get {
return m_dfShift; }
63 set { m_dfShift = value; }
67 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
82 m_dfBase = p.m_dfBase;
83 m_dfScale = p.m_dfScale;
84 m_dfShift = p.m_dfShift;
107 rgChildren.
Add(
"scale",
scale.ToString());
110 rgChildren.
Add(
"shift",
shift.ToString());
112 return new RawProto(strName,
"", rgChildren);
125 if ((strVal = rp.
FindValue(
"base")) !=
null)
128 if ((strVal = rp.
FindValue(
"scale")) !=
null)
131 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.
Specifies the parameters for the ExpLayer.
double base_val
Specifies the base to use for the exponent, where , for base > 0.
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 shift
Specifies the shift to use for the exponent, where , for base > 0.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
static ExpParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
ExpParameter()
Constructor for the parameter.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
double scale
Specifies the scale to use for the exponent, where , for base > 0.
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-...