2using System.Collections.Generic;
21 [TypeConverter(typeof(ExpandableObjectConverter))]
41 return "The engine setting is set on CAFFE.";
63 get {
return m_TrainAlgorithm; }
64 set { m_TrainAlgorithm = value; }
72 get {
return m_RunAlgorithm; }
73 set { m_RunAlgorithm = value; }
81 [Description(
"Specifies the axis along which to perform the softmax - may be negative to index from the end (e.g., -1 for the last axis).")]
84 get {
return m_nAxis; }
85 set { m_nAxis = value; }
89 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
109 m_TrainAlgorithm = p.m_TrainAlgorithm;
110 m_RunAlgorithm = p.m_RunAlgorithm;
125 RawProto rpBase = base.ToProto(
"engine");
129 rgChildren.
Add(
"axis",
axis.ToString());
134 return new RawProto(strName,
"", rgChildren);
149 if ((strVal = rp.
FindValue(
"axis")) !=
null)
150 p.
axis =
int.Parse(strVal);
152 if ((strVal = rp.
FindValue(
"algorithm")) !=
null)
164 if ((strVal = rp.
FindValue(
"algorithm_train")) !=
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.
RawProtoCollection Children
Returns a collection of this nodes child nodes.
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.
Specifies whether to use the NVIDIA cuDnn version or Caffe version of a given forward/backward operat...
Engine engine
Specifies the Engine in use.
static EngineParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
Engine
Defines the type of engine to use.
The LayerParameterBase is the base class for all other layer specific parameters.
Specifies the parameters for the SoftmaxLayer
SOFTMAX_ALGORITHM algorithm
Specifies the softmax algorithm to use during the running and testing.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
bool useCudnn()
Queries whether or not to use NVIDIA's cuDnn. Softmax uses cuDNN as the default.
string useCaffeReason()
Returns the reason that Caffe version was used instead of NVIDIA's cuDnn.
SOFTMAX_ALGORITHM? algorithm_train
Optionally, specifies the softmax algorithm to use during the training phase, when null,...
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
SoftmaxParameter()
Constructor for the parameter.
static new SoftmaxParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
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.
int axis
The axis along which to perform the softmax – 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.
SOFTMAX_ALGORITHM
Specifies the SOFTMAX algorithm to use.
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-...