2using System.Collections.Generic;
26 [TypeConverter(typeof(ExpandableObjectConverter))]
33 bool m_bBiasTerm =
true;
34 bool m_bEnableNoise =
false;
35 double m_dfSigmaInit = 0.017;
57 [Description(
"Specifies the input dimension.")]
60 get {
return m_nInputDim; }
61 set { m_nInputDim = value; }
67 [Description(
"Specifies the gate modulation type.")]
70 get {
return m_modulation; }
71 set { m_modulation = value; }
80 [Description(
"Enable/disable noise in the inner-product layer (default = false).")]
83 get {
return m_bEnableNoise; }
84 set { m_bEnableNoise = value; }
90 [Description(
"Specifies the initialization value for the sigma weight and sigma bias used when 'enable_noise' = true.")]
93 get {
return m_dfSigmaInit; }
94 set { m_dfSigmaInit = value; }
100 [Description(
"Whether to have bias terms or not.")]
103 get {
return m_bBiasTerm; }
104 set { m_bBiasTerm = value; }
110 [Category(
"Fillers")]
111 [Description(
"The filler for the weights.")]
114 get {
return m_fillerParam_weights; }
115 set { m_fillerParam_weights = value; }
121 [Category(
"Fillers")]
122 [Description(
"The filler for the bias.")]
125 get {
return m_fillerParam_bias; }
126 set { m_fillerParam_bias = value; }
134 [Description(
"Specifies the first axis to be lumped into a single inner product computation; all preceding axes are retained in the output.")]
137 get {
return m_nAxis; }
138 set { m_nAxis = value; }
143 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
161 m_bBiasTerm = p.m_bBiasTerm;
163 if (p.m_fillerParam_bias !=
null)
164 m_fillerParam_bias = p.m_fillerParam_bias.
Clone();
166 if (p.m_fillerParam_weights !=
null)
167 m_fillerParam_weights = p.m_fillerParam_weights.
Clone();
170 m_bEnableNoise = p.m_bEnableNoise;
171 m_dfSigmaInit = p.m_dfSigmaInit;
201 rgChildren.
Add(
"axis",
axis.ToString());
205 rgChildren.
Add(
"enable_noise", m_bEnableNoise.ToString());
206 rgChildren.
Add(
"sigma_init", m_dfSigmaInit.ToString());
209 return new RawProto(strName,
"", rgChildren);
222 if ((strVal = rp.
FindValue(
"input_dim")) !=
null)
225 if ((strVal = rp.
FindValue(
"modulation")) !=
null)
231 if ((strVal = rp.
FindValue(
"bias_term")) !=
null)
235 if (rpWeightFiller !=
null)
239 if (rpBiasFiller !=
null)
242 if ((strVal = rp.
FindValue(
"axis")) !=
null)
243 p.
axis =
int.Parse(strVal);
245 if ((strVal = rp.
FindValue(
"enable_noise")) !=
null)
248 if ((strVal = rp.
FindValue(
"sigma_init")) !=
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.
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 GluLayer (Gated Linear Unit).
MODULATION modulation
Specifies the gate modulation type.
FillerParameter bias_filler
The filler for the bias.
int input_dim
Specifies the input dimension.
static GluParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
bool enable_noise
Enable/disable noise in the inner-product layer (default = false).
int axis
Specifies the first axis to be lumped into a single inner product computation; all preceding axes are...
double sigma_init
Specifies the initialization value for the sigma weight and sigma bias used when 'enable_noise' = tru...
bool bias_term
Whether to have bias terms or not.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
GluParameter()
Constructor for the parameter.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
FillerParameter weight_filler
The filler for the weights.
MODULATION
Defines the modulation type.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...