3using System.Collections.Generic;
7using System.Threading.Tasks;
34 [TypeConverter(typeof(ExpandableObjectConverter))]
38 uint m_nNumOutput = 16;
39 double m_dfMin = -1.0;
53 [Description(
"Specifies the axis over which to apply the one-hot vectoring.")]
56 get {
return m_nAxis; }
57 set { m_nAxis = value; }
63 [Description(
"Specifies the minimum number of axes. Axes of size 1 are added to the current axis count up to the minimum.")]
66 get {
return m_nMinAxes; }
67 set { m_nMinAxes = value; }
73 [Description(
"Specifies the number of items within the one-hot vector output.")]
76 get {
return m_nNumOutput; }
77 set { m_nNumOutput = value; }
83 [Description(
"Specifies the minimum data range over which to bucketize for the one-hot vector input.")]
86 get {
return m_dfMin; }
87 set { m_dfMin = value; }
93 [Description(
"Specifies the maximum data range over which to bucketize for the one-hot vector input.")]
96 get {
return m_dfMax; }
97 set { m_dfMax = value; }
106 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
126 m_nNumOutput = p.m_nNumOutput;
129 m_nMinAxes = p.m_nMinAxes;
152 rgChildren.
Add(
"axis",
axis.ToString());
154 rgChildren.
Add(
"min",
min.ToString());
155 rgChildren.
Add(
"max",
max.ToString());
158 return new RawProto(strName,
"", rgChildren);
171 if ((strVal = rp.
FindValue(
"axis")) !=
null)
172 p.
axis =
int.Parse(strVal);
174 if ((strVal = rp.
FindValue(
"num_output")) !=
null)
177 if ((strVal = rp.
FindValue(
"min")) !=
null)
180 if ((strVal = rp.
FindValue(
"max")) !=
null)
183 if ((strVal = rp.
FindValue(
"min_axes")) !=
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.
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.
The LayerParameterBase is the base class for all other layer specific parameters.
Specifies the parameters used by the OneHotLayer
OneHotParameter()
The constructor.
static OneHotParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
double min
Specifies the minimum data range over which to bucketize for the one-hot vector input.
uint num_output
Specifies the number of items within the one-hot vector output.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
double max
Specifies the maximum data range over which to bucketize for the one-hot vector input.
int min_axes
Specifies the minimum number of axes. Axes of size 1 are added to the current axis count up to the mi...
int axis
Specifies the axis over which to apply the one-hot vectoring.
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.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.param.nt namespace defines the parameters used by the Nerual Style Transfer layers.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...