2using System.Collections.Generic;
14 [TypeConverter(typeof(ExpandableObjectConverter))]
19 bool m_bBiasTerm =
true;
31 [Description(
"Specifies the number of outputs for the layer.")]
34 get {
return m_nNumOutput; }
35 set { m_nNumOutput = value; }
43 [Description(
"Specifies the input given as integers to be interpreted as one-hot vector indices with dimension 'num_init'. Hence 'num_input' should be 1 greater than the maximum possible input value.")]
46 get {
return m_nInputDim; }
47 set { m_nInputDim = value; }
53 [Description(
"Specifies wheter ot use a bias term or not.")]
56 get {
return m_bBiasTerm; }
57 set { m_bBiasTerm = value; }
63 [Description(
"Specifies the filler for the weights.")]
66 get {
return m_fillerParam_weights; }
67 set { m_fillerParam_weights = value; }
73 [Description(
"Specifies the filler for the bias.")]
76 get {
return m_fillerParam_bias; }
77 set { m_fillerParam_bias = value; }
81 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
97 m_nNumOutput = p.m_nNumOutput;
98 m_nInputDim = p.m_nInputDim;
99 m_bBiasTerm = p.m_bBiasTerm;
101 if (p.m_fillerParam_bias !=
null)
102 m_fillerParam_bias = p.m_fillerParam_bias.
Clone();
104 if (p.m_fillerParam_weights !=
null)
105 m_fillerParam_weights = p.m_fillerParam_weights.
Clone();
137 return new RawProto(strName,
"", rgChildren);
150 if ((strVal = rp.
FindValue(
"num_output")) !=
null)
153 if ((strVal = rp.
FindValue(
"input_dim")) !=
null)
156 if ((strVal = rp.
FindValue(
"bias_term")) !=
null)
160 if (rpWeightFiller !=
null)
164 if (rpBiasFiller !=
null)
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 parameters used by the EmbedLayer.
uint num_output
Specifies the number of outputs for the layer.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
static EmbedParameter 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 void Copy(LayerParameterBase src)
Copy on parameter to another.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
EmbedParameter()
Constructor for the parameter.
FillerParameter bias_filler
Specifies the filler for the bias.
FillerParameter weight_filler
Specifies the filler for the weights.
uint input_dim
Specifies the input given as integers to be interpreted as one-hot vector indices with dimension num_...
bool bias_term
Specifies whether to use a bias term or not.
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.
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-...