2using System.Collections.Generic;
15 [TypeConverter(typeof(ExpandableObjectConverter))]
19 List<uint> m_rgSlicePoint =
new List<uint>();
32 [Description(
"Specifies the axis along which to slice - may be negative to index from the end (e.g., -1 for the last axis).")]
35 get {
return m_nAxis; }
36 set { m_nAxis = value; }
42 [Description(
"Specifies the optional slice points which indicate the indexes in the selected dimensions (the number of indices must be equal to the number of top blobs minus one).")]
45 get {
return m_rgSlicePoint; }
46 set { m_rgSlicePoint = value; }
52 [Description(
"DEPRECIATED - use 'axis' instead.")]
56 get {
return m_nSliceDim; }
57 set { m_nSliceDim = value; }
61 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
78 m_rgSlicePoint =
Utility.Clone<uint>(p.m_rgSlicePoint);
79 m_nSliceDim = p.m_nSliceDim;
99 rgChildren.
Add(
"axis",
axis.ToString());
105 return new RawProto(strName,
"", rgChildren);
118 if ((strVal = rp.
FindValue(
"axis")) !=
null)
119 p.
axis =
int.Parse(strVal);
123 if ((strVal = rp.
FindValue(
"slice_dim")) !=
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.
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.
The LayerParameterBase is the base class for all other layer specific parameters.
Specifies the parameters for the SliceLayer.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
static SliceParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
SliceParameter()
Constructor for the parameter.
uint slice_dim
DEPRECIATED: alias for 'axis' – does not support negative indexing.
List< uint > slice_point
Specifies optional slice points which indicate the indexes in the selected dimensions (the number of ...
int axis
Specifies the axis along wich to slice – may be negative to index from the end (e....
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-...