2using System.Collections.Generic;
17 [TypeConverter(typeof(ExpandableObjectConverter))]
20 List<FillerParameter> m_rgFillers =
new List<FillerParameter>();
21 List<BlobShape> m_rgShape =
new List<BlobShape>();
22 List<uint> m_rgNum =
new List<uint>();
23 List<uint> m_rgChannels =
new List<uint>();
24 List<uint> m_rgHeight =
new List<uint>();
25 List<uint> m_rgWidth =
new List<uint>();
26 bool m_bPrimaryData =
true;
27 bool m_bForceRefill =
true;
43 get {
return m_bForceRefill; }
44 set { m_bForceRefill = value; }
50 [Category(
"Data Selection"), Description(
"Specifies whether or not this data is the primary dataset as opposed to the target dataset. By default, this is set to 'true'.")]
53 get {
return m_bPrimaryData; }
54 set { m_bPrimaryData = value; }
60 [Description(
"Specifies the data fillers used to fill the data. If no data fillers are specified, the constant filler is used.")]
63 get {
return m_rgFillers; }
64 set { m_rgFillers = value; }
74 [Description(
"Specifies the shape of the dummy data where: shape(0) = num; shape(1) = channels; shape(2) = height; shape(3) = width.")]
77 get {
return m_rgShape; }
78 set { m_rgShape = value; }
84 [Description(
"DEPRECIATED: use 'shape(0)' instead.")]
87 get {
return m_rgNum; }
88 set { m_rgNum = value; }
94 [Description(
"DEPRECIATED: use 'shape(1)' instead.")]
97 get {
return m_rgChannels; }
98 set { m_rgChannels = value; }
104 [Description(
"DEPRECIATED: use 'shape(2)' instead.")]
107 get {
return m_rgHeight; }
108 set { m_rgHeight = value; }
114 [Description(
"DEPRECIATED: use 'shape(3)' instead.")]
117 get {
return m_rgWidth; }
118 set { m_rgWidth = value; }
122 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
139 m_rgNum =
Utility.Clone<uint>(p.m_rgNum);
140 m_rgChannels =
Utility.Clone<uint>(p.m_rgChannels);
141 m_rgHeight =
Utility.Clone<uint>(p.m_rgHeight);
142 m_rgWidth =
Utility.Clone<uint>(p.m_rgWidth);
143 m_bPrimaryData = p.m_bPrimaryData;
144 m_bForceRefill = p.m_bForceRefill;
166 rgChildren.Add(fp.
ToProto(
"data_filler"));
171 rgChildren.Add(bs.
ToProto(
"shape"));
174 rgChildren.Add<uint>(
"num",
num);
175 rgChildren.Add<uint>(
"channels",
channels);
176 rgChildren.Add<uint>(
"height",
height);
177 rgChildren.Add<uint>(
"width",
width);
180 rgChildren.Add(
"primary_data",
primary_data.ToString());
183 rgChildren.Add(
"force_refill",
force_refill.ToString());
185 return new RawProto(strName,
"", rgChildren);
204 rgp = rp.FindChildren(
"shape");
210 p.num = rp.FindArray<uint>(
"num");
211 p.channels = rp.FindArray<uint>(
"channels");
212 p.height = rp.FindArray<uint>(
"height");
213 p.width = rp.FindArray<uint>(
"width");
216 if ((strVal = rp.FindValue(
"primary_data")) !=
null)
217 p.primary_data =
bool.Parse(strVal);
219 if ((strVal = rp.FindValue(
"force_refill")) !=
null)
220 p.force_refill =
bool.Parse(strVal);
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.
RawProtoCollection FindChildren(params string[] rgstrName)
Searches for all children with a given name in this node's children.
The Utility class provides general utility funtions.
Specifies the shape of a Blob.
override RawProto ToProto(string strName)
Converts the BlobShape to a RawProto.
static BlobShape FromProto(RawProto rp)
Parse a new BlobShape from a RawProto.
This layer produces N >= 1 top blobs. DummyDataParameter must specify 1 or shape fields,...
List< uint > width
DEPRECIATED - 4D dimensions, use 'shape' instead.
bool primary_data
(optional, default = true) Specifies whether or not the data is the primary datset as opposed to a se...
static DummyDataParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
List< FillerParameter > data_filler
If 0 data fillers are specified, ConstantFiller
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.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
List< BlobShape > shape
Specifies the shape of the dummy data where: shape(0) = num shape(1) = channels shape(2) = height sha...
List< uint > num
DEPRECIATED - 4D dimensions, use 'shape' instead.
bool force_refill
(optional, default = true) Specifies whether to force refill the data (even constant data) as opposed...
List< uint > channels
DEPRECIATED - 4D dimensions, use 'shape' instead.
DummyDataParameter()
Constructor for the parameter.
List< uint > height
>DEPRECIATED - 4D dimensions, use 'shape' instead.
Specifies the filler parameters used to create each Filler.
static FillerParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
The LayerParameterBase is the base class for all other layer specific parameters.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.common namespace contains common MyCaffe classes.
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-...