2using System.Collections.Generic;
16 [TypeConverter(typeof(ExpandableObjectConverter))]
34 [Description(
"Specifies the axis along which to perform the softmax - may be negative to index from the end (e.g., -1 for the last axis).")]
37 get {
return m_nAxis; }
38 set { m_nAxis = value; }
46 get {
return m_nDim; }
47 set { m_nDim = value; }
54 [Description(
"The filler for the weights.")]
57 get {
return m_fillerParam_weights; }
58 set { m_fillerParam_weights = value; }
65 [Description(
"The filler for the bias.")]
68 get {
return m_fillerParam_bias; }
69 set { m_fillerParam_bias = value; }
73 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
92 if (p.m_fillerParam_bias !=
null)
93 m_fillerParam_bias = p.m_fillerParam_bias.
Clone();
95 if (p.m_fillerParam_weights !=
null)
96 m_fillerParam_weights = p.m_fillerParam_weights.
Clone();
116 rgChildren.
Add(
"axis",
axis.ToString());
117 rgChildren.
Add(
"dim",
dim.ToString());
125 return new RawProto(strName,
"", rgChildren);
138 if ((strVal = rp.
FindValue(
"axis")) !=
null)
139 p.
axis =
int.Parse(strVal);
141 if ((strVal = rp.
FindValue(
"dim")) !=
null)
142 p.
dim = uint.Parse(strVal);
145 if (rpWeightFiller !=
null)
149 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.
[/b DEPRECIATED, use MultiHeadAttention layers instead.] Specifies the parameters for the AttentionLa...
int axis
The axis along which to perform the softmax – may be negative to index from the end (e....
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
AttentionParameter()
Constructor for the parameter.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
FillerParameter bias_filler
The filler for the bias.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
FillerParameter weight_filler
The filler for the weights.
static AttentionParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
uint dim
Specifies the dim of the attention unit which should match the LSTM output size.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
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-...