2using System.Collections.Generic;
23 [TypeConverter(typeof(ExpandableObjectConverter))]
27 List<uint> m_rgOffset =
new List<uint>();
42 [Description(
"The axis along which to crop - may be negative to index from the end (e.g., -1 for the last axis). Other axes must have the same dimension for all the bottom blobs. By default, the ConcatLayer concatenates blobs along the 'channel' axis 1.")]
45 get {
return m_nAxis; }
46 set { m_nAxis = value; }
60 get {
return m_rgOffset; }
61 set { m_rgOffset = value; }
65 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
81 m_rgOffset =
Utility.Clone<uint>(p.m_rgOffset);
102 rgChildren.
Add(
"axis",
axis.ToString());
106 return new RawProto(strName,
"", rgChildren);
119 if ((strVal = rp.
FindValue(
"axis")) !=
null)
120 p.
axis =
int.Parse(strVal);
122 p.
offset = rp.FindArray<uint>(
"offset");
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 Utility class provides general utility funtions.
Specifies the parameters for the MyCaffe.CropLayer.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
static CropParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
List< uint > offset
Specifies the offset to set the shift for all/each dimension.
CropParameter()
Constructor for the parameter.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
int axis
The axis along which to crop – may be negative to index from the end (e.g., -1 for the last axis)....
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-...