2using System.Collections.Generic;
21 [TypeConverter(typeof(ExpandableObjectConverter))]
24 List<uint> m_rgUnpool =
new List<uint>();
25 uint? m_nUnPoolH =
null;
26 uint? m_nUnPoolW =
null;
39 return "Not supported by cuDNN.";
55 [Description(
"Specifies unpool size override given as a single value for equal dimensions in all spatial dimensions, or once per spatial dimension.")]
58 get {
return m_rgUnpool; }
59 set { m_rgUnpool = value; }
69 [Description(
"Specifies unpooling height override (2D only). 'unpool_h' and 'unpool_w' are used -or- 'unpool_size' is used, but not both.")]
72 get {
return m_nUnPoolH; }
73 set { m_nUnPoolH = value; }
83 [Description(
"Specifies unpooling width override (2D only). 'unpool_h' and 'unpool_w' are used -or- 'unpool_size' is used, but not both.")]
86 get {
return m_nUnPoolW; }
87 set { m_nUnPoolW = value; }
97 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
103 throw new Exception(
"Expected UnPoolingParameter type!");
123 m_rgUnpool =
Utility.Clone<uint>(p.m_rgUnpool);
124 m_nUnPoolH = p.m_nUnPoolH;
125 m_nUnPoolW = p.m_nUnPoolW;
148 RawProto rpBase = base.ToProto(
"pooling");
152 rgChildren.
Add<uint>(
"unpool_size", m_rgUnpool);
153 rgChildren.
Add(
"unpool_h", m_nUnPoolH);
154 rgChildren.
Add(
"unpool_w", m_nUnPoolW);
156 return new RawProto(strName,
"", rgChildren);
170 p.m_rgUnpool = rp.FindArray<uint>(
"unpool_size");
171 p.m_nUnPoolH = (uint?)rp.
FindValue(
"unpool_h", typeof(uint));
172 p.m_nUnPoolW = (uint?)rp.
FindValue(
"unpool_w", typeof(uint));
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.
RawProtoCollection Children
Returns a collection of this nodes child nodes.
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 Utility class provides general utility funtions.
List< uint > dilation
Factor used to dilate the kernel, (implicitly) zero-filling the resulting holes. (Kernel dilation is ...
The LayerParameterBase is the base class for all other layer specific parameters.
Specifies the parameters for the PoolingLayer.
PoolingParameter()
Constructor for the parameter.
static new PoolingParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
Specifies the parameters for the UnPoolingLayer.
UnPoolingParameter()
Constructor for the parameter.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
new bool useCudnn()
Queries whether or not to use NVIDIA's cuDnn.
List< uint > unpool_size
UnPool size is given as a single value for equal dimensions in all spatial dimensions,...
static new UnPoolingParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
new string useCaffeReason()
Returns the reason that Caffe version was used instead of NVIDIA's cuDnn.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
uint? unpool_h
The unpooling height override (2D only)
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
uint? unpool_w
The unpooling width override (2D only)
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.param.beta parameters are used by the MyCaffe.layer.beta layers.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...