2using System.Collections.Generic;
14 [TypeConverter(typeof(ExpandableObjectConverter))]
17 int? m_nIgnoreLabel =
null;
19 bool m_bNormalize =
false;
63 m_normalization = norm;
69 [Description(
"Ignore instances with the given label, when specified.")]
72 get {
return m_nIgnoreLabel; }
73 set { m_nIgnoreLabel = value; }
79 [Description(
"Specifies the normalization mode to use (default = VALID).")]
82 get {
return m_normalization; }
83 set { m_normalization = value; }
91 [Description(
"DEPRECIATED - use 'normalization == BATCH_SIZE' instead.")]
95 get {
return m_bNormalize; }
96 set { m_bNormalize = value; }
100 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
116 m_nIgnoreLabel = p.m_nIgnoreLabel;
117 m_normalization = p.m_normalization;
118 m_bNormalize = p.m_bNormalize;
146 return new RawProto(strName,
"", rgChildren);
161 if ((strVal = rp.
FindValue(
"normalization")) !=
null)
182 throw new Exception(
"Unknown 'normalization' value: " + strVal);
186 if ((strVal = rp.
FindValue(
"normalize")) !=
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 LayerParameterBase is the base class for all other layer specific parameters.
Stores the parameters used by loss layers.
NormalizationMode
How to normalize the loss for loss layers that aggregate across batches, spatial dimensions,...
static LossParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
bool normalize
DEPRECIATED. Ignore if normalization is specified. If normalization is not specified,...
NormalizationMode? normalization
Specifies the normalization mode (default = VALID).
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
LossParameter(NormalizationMode norm=NormalizationMode.VALID)
The constructor for the LossParameter.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
int? ignore_label
If specified, the ignore instances with the given label.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
@ NONE
No training category specified.
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-...