2using System.Collections.Generic;
25 [TypeConverter(typeof(ExpandableObjectConverter))]
31 float m_fDropout = 0.05f;
32 int? m_nContextDim =
null;
33 bool m_bBatchFirst =
true;
46 [Description(
"Specifies the quantity of input variables, including both numeric and categorical for the relevant channel.")]
49 get {
return m_nNumInputs; }
50 set { m_nNumInputs = value; }
56 [Description(
"Specifies the attribute/embedding dimension of the input, associated witht he 'state_size' of the model.")]
59 get {
return m_nInputDim; }
60 set { m_nInputDim = value; }
66 [Description(
"Specifies the embedding width of the output.")]
69 get {
return m_nHiddenDim; }
70 set { m_nHiddenDim = value; }
76 [Description(
"Specifies the embedding width of the context signal expected to be fed as an auxiliary input (optional, can be null).")]
79 get {
return m_nContextDim; }
80 set { m_nContextDim = value; }
86 [Description(
"Specifies the dropout ratio used with the GRNs (default = 0.05 or 5%).")]
89 get {
return m_fDropout; }
90 set { m_fDropout = value; }
96 [Description(
"Specifies a boolean indicating whether the batch dimension is expected to be the first dimension of the input or not.")]
99 get {
return m_bBatchFirst; }
100 set { m_bBatchFirst = value; }
106 [Category(
"Fillers")]
107 [Description(
"The filler for the weights.")]
110 get {
return m_fillerParam_weights; }
111 set { m_fillerParam_weights = value; }
117 [Category(
"Fillers")]
118 [Description(
"The filler for the bias.")]
121 get {
return m_fillerParam_bias; }
122 set { m_fillerParam_bias = value; }
130 [Description(
"Specifies the first axis to be lumped into a single inner product computation; all preceding axes are retained in the output.")]
133 get {
return m_nAxis; }
134 set { m_nAxis = value; }
138 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
162 if (p.m_fillerParam_bias !=
null)
163 m_fillerParam_bias = p.m_fillerParam_bias.
Clone();
165 if (p.m_fillerParam_weights !=
null)
166 m_fillerParam_weights = p.m_fillerParam_weights.
Clone();
200 rgChildren.
Add(
"axis",
axis.ToString());
202 return new RawProto(strName,
"", rgChildren);
215 if ((strVal = rp.
FindValue(
"input_dim")) !=
null)
218 if ((strVal = rp.
FindValue(
"hidden_dim")) !=
null)
221 if ((strVal = rp.
FindValue(
"num_inputs")) !=
null)
224 if ((strVal = rp.
FindValue(
"context_dim")) !=
null)
227 if ((strVal = rp.
FindValue(
"dropout_ratio")) !=
null)
230 if ((strVal = rp.
FindValue(
"batch_first")) !=
null)
234 if (rpWeightFiller !=
null)
238 if (rpBiasFiller !=
null)
241 if ((strVal = rp.
FindValue(
"axis")) !=
null)
242 p.
axis =
int.Parse(strVal);
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).
Specifies the parameters for the VarSelNetLayer (Variable Selection Network).
int hidden_dim
Specifies the embedding width of the output.
int? context_dim
Specifies the embedding width of the context signal expected to be fed as an auxiliary input (optiona...
FillerParameter weight_filler
The filler for the weights.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
int num_inputs
Specifies the quantity of input variables, including both numeric and categorical for the relevant ch...
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
int input_dim
Specifies the attribute/embedding dimension of the input, associated witht he 'state_size' of the mod...
FillerParameter bias_filler
The filler for the bias.
float dropout_ratio
Specifies the dropout ratio used with the GRNs (default = 0.05 or 5%).
VarSelNetParameter()
Constructor for the parameter.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
static VarSelNetParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
int axis
Specifies the first axis to be lumped into a single inner product computations; all preceding axes ar...
bool batch_first
Specifies a boolean indicating whether the batch dimension is expected to be the first dimension of t...
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-...