2using System.Collections.Generic;
19 [TypeConverter(typeof(ExpandableObjectConverter))]
22 bool m_bNoGate =
false;
23 bool m_bMinimal =
false;
25 int m_nHiddenSize = 0;
26 int m_nBackboneUnits = 1;
27 int m_nBackboneLayers = 1;
28 float m_fBackboneDropout = 0.0f;
66 [Description(
"Specifies whether to use the gate or not (when true, the no gate mode is used to calculate the forward output).")]
69 get {
return m_bNoGate; }
70 set { m_bNoGate = value; }
76 [Description(
"Specifies whether to use the minimal model or not (when true, the minimal mode is used to calculate the forward output).")]
79 get {
return m_bMinimal; }
80 set { m_bMinimal = value; }
86 [Description(
"Specifies the input size used to size the backbone units.")]
89 get {
return m_nInputSize; }
90 set { m_nInputSize = value; }
96 [Description(
"Specifies the hidden size used to size the backbone units and other internal layers.")]
99 get {
return m_nHiddenSize; }
100 set { m_nHiddenSize = value; }
106 [Description(
"Specifies the number of backbone units.")]
109 get {
return m_nBackboneUnits; }
110 set { m_nBackboneUnits = value; }
116 [Description(
"Specifies the number of backbone layers.")]
119 get {
return m_nBackboneLayers; }
120 set { m_nBackboneLayers = value; }
126 [Description(
"Specifies the backbone dropout ratio.")]
129 get {
return m_fBackboneDropout; }
130 set { m_fBackboneDropout = value; }
136 [Description(
"Specifies the backbone activation function.")]
139 get {
return m_backboneActivation; }
140 set { m_backboneActivation = value; }
144 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
187 rgChildren.
Add(
"no_gate",
no_gate.ToString());
188 rgChildren.
Add(
"minimal",
minimal.ToString());
196 return new RawProto(strName,
"", rgChildren);
209 if ((strVal = rp.
FindValue(
"no_gate")) !=
null)
210 p.
no_gate =
bool.Parse(strVal);
212 if ((strVal = rp.
FindValue(
"minimal")) !=
null)
213 p.
minimal =
bool.Parse(strVal);
215 if ((strVal = rp.
FindValue(
"input_size")) !=
null)
218 if ((strVal = rp.
FindValue(
"hidden_size")) !=
null)
221 if ((strVal = rp.
FindValue(
"backbone_units")) !=
null)
224 if ((strVal = rp.
FindValue(
"backbone_layers")) !=
null)
227 if ((strVal = rp.
FindValue(
"backbone_dropout_ratio")) !=
null)
230 if ((strVal = rp.
FindValue(
"backbone_activation")) !=
null)
The BaseParameter class is the base class for all other parameter classes.
static float ParseFloat(string strVal)
Parse float values using the US culture if the decimal separator = '.', then using the native culture...
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 for the CfcUnitLayer used by the CfCLayer.
ACTIVATION
Defines the activation function used by the backbone.
int input_size
Specifies the input size used to size the backbone units.
bool no_gate
Specifies whether to use the gate or not (when true, the no gate mode is used to calculate the forwar...
ACTIVATION backbone_activation
Specifies the backbone activation function.
int hidden_size
Specifies the hidden size used to size the backbone units and other internal layers.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
int backbone_units
Specifies the number of backbone units
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
CfcUnitParameter()
Constructor for the parameter.
bool minimal
Specifies whether to use the minimal model or not (when true, the minimal mode is used to calculate t...
int backbone_layers
Specifies the number of backbone layers.
static CfcUnitParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
float backbone_dropout_ratio
Specifies the backbone dropout ratio.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...