2using System.Collections.Generic;
14 [TypeConverter(typeof(ExpandableObjectConverter))]
50 double m_dfCoeff = 1.0;
60 [Description(
"Specifies the reduction operation.")]
63 get {
return m_operation; }
64 set { m_operation = value; }
85 [Description(
"Specifies the first axis to reduce to scalar -- may be negative to index from the end (e.g., -1 for the last axis)..")]
88 get {
return m_nAxis; }
89 set { m_nAxis = value; }
95 [Description(
"Specifies the coefficient for output.")]
98 get {
return m_dfCoeff; }
99 set { m_dfCoeff = value; }
103 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
118 m_operation = p.m_operation;
120 m_dfCoeff = p.m_dfCoeff;
143 rgChildren.
Add(
"axis",
axis.ToString());
146 rgChildren.
Add(
"coeff",
coeff.ToString());
148 return new RawProto(strName,
"", rgChildren);
161 if ((strVal = rp.
FindValue(
"operation")) !=
null)
190 throw new Exception(
"Uknown 'operation' value: " + strVal);
194 if ((strVal = rp.
FindValue(
"axis")) !=
null)
195 p.
axis =
int.Parse(strVal);
197 if ((strVal = rp.
FindValue(
"coeff")) !=
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 used by ReductionLayer.
int axis
The first axis to reduce to scalar – may be negative index from the end (e.g., -1 for the last axis)....
ReductionOp
Defines the reduction operation.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
double coeff
Specifies the coefficient used to scale the output.
ReductionOp operation
Specifies the reduction operation.
static ReductionParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
ReductionParameter()
Constructor for 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-...