2using System.Collections.Generic;
18 [TypeConverter(typeof(ExpandableObjectConverter))]
21 bool m_bAcrossSpatial =
true;
23 bool m_bChannelShared =
true;
24 float m_fEps = 1e-10f;
36 [Description(
"Specifies to normalize across the spatial dimensions.")]
39 get {
return m_bAcrossSpatial; }
40 set { m_bAcrossSpatial = value; }
46 [Description(
"Specifies the filler for the initial value of scale, default is 1.0 for all.")]
49 get {
return m_scaleFiller; }
50 set { m_scaleFiller = value; }
56 [Description(
"Specifies whether or not the scale parameters are shared across channels.")]
59 get {
return m_bChannelShared; }
60 set { m_bChannelShared = value; }
66 [Description(
"Specifies the epsilon for not dividing by zero while normalizing variance.")]
69 get {
return m_fEps; }
70 set { m_fEps = value; }
79 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
97 m_bAcrossSpatial = p.m_bAcrossSpatial;
98 m_bChannelShared = p.m_bChannelShared;
100 m_scaleFiller = p.m_scaleFiller.
Clone();
123 rgChildren.
Add(
"across_spatial", m_bAcrossSpatial.ToString());
124 rgChildren.
Add(
"channel_shared", m_bChannelShared.ToString());
125 rgChildren.
Add(
"esp", m_fEps.ToString());
128 return new RawProto(strName,
"", rgChildren);
141 if ((strVal = rp.
FindValue(
"across_spatial")) !=
null)
144 if ((strVal = rp.
FindValue(
"channel_shared")) !=
null)
147 if ((strVal = rp.
FindValue(
"eps")) !=
null)
151 if (rgScaleFiller !=
null)
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.
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 filler parameters used to create each Filler.
static FillerParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
FillerParameter Clone()
Creates a new copy of this instance of the parameter.
The LayerParameterBase is the base class for all other layer specific parameters.
Specifies the parameters for the Normalization2Layer used in SSD.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
float eps
Specifies the epsilon for not dividing by zero while normalizing variance.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
static Normalization2Parameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
Normalization2Parameter()
The constructor.
FillerParameter scale_filler
Specifies the filler for the initial value of scale, default is 1.0 for all.
bool channel_shared
Specifies whether or not the scale parameters are shared across channels.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
bool across_spatial
Specifies to normalize across the spatial dimensions.
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-...