2using System.Collections.Generic;
19 [TypeConverter(typeof(ExpandableObjectConverter))]
23 bool m_bGlobalPooling =
false;
76 return "The engine setting is set on CAFFE.";
79 return "The STOCHASTIC pooing method is currently not supported with cuDnn.";
102 [Description(
"Specifies pooling method to use.")]
105 get {
return m_pool; }
106 set { m_pool = value; }
112 [Description(
"Specifies whether or not to enable global pooling.")]
115 get {
return m_bGlobalPooling; }
116 set { m_bGlobalPooling = value; }
133 get {
return m_reshapeAlgorithm; }
134 set { m_reshapeAlgorithm = value; }
138 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
158 m_bGlobalPooling = p.m_bGlobalPooling;
159 m_reshapeAlgorithm = p.m_reshapeAlgorithm;
175 RawProto rpBase = base.ToProto(
"kernel");
179 rgChildren.
Add(
"pool",
pool.ToString());
187 return new RawProto(strName,
"", rgChildren);
202 if ((strVal = rp.
FindValue(
"pool")) !=
null)
219 throw new Exception(
"Unknown pooling 'method' value: " + strVal);
223 if ((strVal = rp.
FindValue(
"global_pooling")) !=
null)
226 if ((strVal = rp.
FindValue(
"reshape_algorithm")) !=
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.
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.
Specifies whether to use the NVIDIA cuDnn version or Caffe version of a given forward/backward operat...
Engine engine
Specifies the Engine in use.
Engine
Defines the type of engine to use.
Specifies the basic kernel parameters (used by convolution and pooling)
static new KernelParameter FromProto(RawProto rp)
Parse a RawProto into a new instance of the parameter.
List< uint > dilation
Factor used to dilate the kernel, (implicitly) zero-filling the resulting holes. (Kernel dilation is ...
KernelParameter()
Constructor for the parameter.
The LayerParameterBase is the base class for all other layer specific parameters.
Specifies the parameters for the PoolingLayer.
PoolingReshapeAlgorithm
Defines the pooling reshape algorithm to use.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
string useCaffeReason()
Returns the reason that Caffe version was used instead of NVIDIA's cuDnn.
PoolingMethod
Defines the pooling method.
PoolingParameter()
Constructor for the parameter.
bool useCudnn()
Queries whether or not to use NVIDIA's cuDnn.
PoolingMethod pool
Specifies the pooling method.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
static new PoolingParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
bool global_pooling
Specifies whether or not to enable global pooling.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
PoolingReshapeAlgorithm reshape_algorithm
Specifies the reshape algorithm to use, either the original Caffe reshape (default = false) or the ne...
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
@ DEFAULT
Specifies to use the default data type of the gym used.
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-...