2using System.Collections.Generic;
16 [TypeConverter(typeof(ExpandableObjectConverter))]
19 int? m_nHeight =
null;
21 int? m_nZoomFactor =
null;
22 int? m_nShrinkFactor =
null;
34 [Description(
"Specifies the height of the output.")]
37 get {
return m_nHeight; }
38 set { m_nHeight = value; }
44 [Description(
"Specifies the width of the output.")]
47 get {
return m_nWidth; }
48 set { m_nWidth = value; }
54 [Description(
"Specifies the zoom factor of the output.")]
57 get {
return m_nZoomFactor; }
58 set { m_nZoomFactor = value; }
64 [Description(
"Specifies the shrink factor of the output.")]
67 get {
return m_nShrinkFactor; }
68 set { m_nShrinkFactor = value; }
74 [Description(
"Specifies the padding at the begin of the output.")]
77 get {
return m_nPadBeg; }
78 set { m_nPadBeg = value; }
84 [Description(
"Specifies the padding at the end of the output.")]
87 get {
return m_nPadEnd; }
88 set { m_nPadEnd = value; }
92 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
134 rgChildren.
Add(
"height",
height.ToString());
136 rgChildren.
Add(
"width",
width.ToString());
141 rgChildren.
Add(
"pad_beg",
pad_beg.ToString());
142 rgChildren.
Add(
"pad_end",
pad_end.ToString());
144 return new RawProto(strName,
"", rgChildren);
157 if ((strVal = rp.
FindValue(
"height")) !=
null)
158 p.
height =
int.Parse(strVal);
160 if ((strVal = rp.
FindValue(
"width")) !=
null)
161 p.
width =
int.Parse(strVal);
163 if ((strVal = rp.
FindValue(
"zoom_factor")) !=
null)
166 if ((strVal = rp.
FindValue(
"shrink_factor")) !=
null)
169 if ((strVal = rp.
FindValue(
"pad_beg")) !=
null)
172 if ((strVal = rp.
FindValue(
"pad_end")) !=
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.
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 for the InterpLayer.
InterpParameter()
Constructor for the parameter.
static InterpParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
int? zoom_factor
Specifies the height of the output.
int? height
Specifies the height of the output.
int? width
Specifies the width of the output.
int pad_beg
Specifies the padding at the begin of the output.
int? shrink_factor
Specifies the shrink factor of the output.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
int pad_end
Specifies the padding at the end of the output.
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-...