2using System.Collections.Generic;
18 [TypeConverter(typeof(ExpandableObjectConverter))]
21 List<int> m_rgOrder =
new List<int>();
38 [Description(
"Specifies the new orders of the axes of data. Should be within the same range as the input data starting with 0 and no repeated orders.")]
41 get {
return m_rgOrder; }
42 set { m_rgOrder = value; }
51 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
92 foreach (
int nOrder
in m_rgOrder)
94 rgChildren.Add(
"order", nOrder.ToString());
97 return new RawProto(strName,
"", rgChildren);
110 foreach (
RawProto rp1
in rgChildren)
125 public static List<int>
Reshape(List<int> rgOrder, List<int> rgShape,
int nNumAxes)
127 List<int> rgTopShape =
new List<int>();
129 for (
int i = 0; i < nNumAxes; i++)
131 int nOrder = rgOrder[i];
132 int nShape = rgShape[nOrder];
133 rgTopShape.Add(nShape);
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.
string Value
Get/set the value of the node.
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.
The LayerParameterBase is the base class for all other layer specific parameters.
Specifies the parameters for the PermuteLayer.
static PermuteParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
PermuteParameter()
The constructor.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
static List< int > Reshape(List< int > rgOrder, List< int > rgShape, int nNumAxes)
Calculates the top shape by running the Reshape calculation.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
List< int > order
Specifies the new orders of the axes of data.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.param.ssd namespace contains all SSD related parameter objects that correspond to the nat...
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...