MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.param.beta.DecodeParameter Class Reference

Specifies the parameters for the DecodeLayer and the AccuracyEncodingLayer. More...

Inheritance diagram for MyCaffe.param.beta.DecodeParameter:
MyCaffe.param.LayerParameterBase MyCaffe.basecode.BaseParameter MyCaffe.basecode.IBinaryPersist

Public Types

enum  TARGET { PREGEN , CENTROID , KNN }
 Defines the target type. More...
 
- Public Types inherited from MyCaffe.param.LayerParameterBase
enum  LABEL_TYPE { NONE , SINGLE , MULTIPLE , ONLY_ONE }
 Defines the label type. More...
 

Public Member Functions

 DecodeParameter ()
 Constructor for the parameter. More...
 
override object Load (System.IO.BinaryReader br, bool bNewInstance=true)
 Load the parameter from a binary reader. More...
 
override void Copy (LayerParameterBase src)
 Copy on parameter to another. More...
 
override LayerParameterBase Clone ()
 Creates a new copy of this instance of the parameter. More...
 
override RawProto ToProto (string strName)
 Convert the parameter into a RawProto. More...
 
- Public Member Functions inherited from MyCaffe.param.LayerParameterBase
 LayerParameterBase ()
 Constructor for the parameter. More...
 
virtual string PrepareRunModelInputs ()
 This method gives derivative classes a chance specify model inputs required by the run model. More...
 
virtual void PrepareRunModel (LayerParameter p)
 This method gives derivative classes a chance to prepare the layer for a run-model. More...
 
void Save (BinaryWriter bw)
 Save this parameter to a binary writer. More...
 
abstract object Load (BinaryReader br, bool bNewInstance=true)
 Load the parameter from a binary reader. More...
 
- Public Member Functions inherited from MyCaffe.basecode.BaseParameter
 BaseParameter ()
 Constructor for the parameter. More...
 
virtual bool Compare (BaseParameter p)
 Compare this parameter to another parameter. More...
 

Static Public Member Functions

static DecodeParameter FromProto (RawProto rp)
 Parses the parameter from a RawProto. More...
 
- Static Public Member Functions inherited from MyCaffe.basecode.BaseParameter
static double ParseDouble (string strVal)
 Parse double values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More...
 
static bool TryParse (string strVal, out double df)
 Parse double values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More...
 
static float ParseFloat (string strVal)
 Parse float values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More...
 
static bool TryParse (string strVal, out float f)
 Parse doufloatble values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More...
 

Properties

double pregen_alpha [getset]
 Specifies the pregen margin. More...
 
int pregen_label_count [getset]
 Specifies the pre-generate target count, only used when 'target' = PREGEN. More...
 
bool enable_centroid_update [getset]
 Specifies whether or not to update the centroids. For example in some cases a fixed centroid may be desired, such as is the case when initializing centroids with a PREGEN value. More...
 
int centroid_output_iteration [getset]
 Specifies the iteration where calculated centroids are output for each label, before this value, the centroids should not be used for their calculation is not complete (default = 300). More...
 
bool output_centroids [getset]
 Optionally, specifies to output the centroids in top[1] (default = false). More...
 
List< int > ignore_labels [getset]
 Optionally, specifies one or more labels to ignore. (default = none, which then expects all labels). More...
 
TARGET target [getset]
 Optionally, specifies the target type to use (default = CENTROID). More...
 
int cache_size [getset]
 Specifies the size of the cache (in number of batches) used when calculating the CENTROID and KNN values (default = 300). More...
 
int k [getset]
 Optionally, specifies the K value to use with the KNN target (default = 5). More...
 

Detailed Description

Specifies the parameters for the DecodeLayer and the AccuracyEncodingLayer.

Definition at line 27 of file DecodeParameter.cs.

Member Enumeration Documentation

◆ TARGET

Defines the target type.

Enumerator
PREGEN 

Specifies to use pre-generated targets that are evenly spaced.

CENTROID 

Specifies to use the centroid as the target.

KNN 

Specifies to use the k-nearest neighbor as the target.

Definition at line 42 of file DecodeParameter.cs.

Constructor & Destructor Documentation

◆ DecodeParameter()

MyCaffe.param.beta.DecodeParameter.DecodeParameter ( )

Constructor for the parameter.

Definition at line 59 of file DecodeParameter.cs.

Member Function Documentation

◆ Clone()

override LayerParameterBase MyCaffe.param.beta.DecodeParameter.Clone ( )
virtual

Creates a new copy of this instance of the parameter.

Returns
A new instance of this parameter is returned.

Implements MyCaffe.param.LayerParameterBase.

Definition at line 201 of file DecodeParameter.cs.

◆ Copy()

override void MyCaffe.param.beta.DecodeParameter.Copy ( LayerParameterBase  src)
virtual

Copy on parameter to another.

Parameters
srcSpecifies the parameter to copy.

Implements MyCaffe.param.LayerParameterBase.

Definition at line 180 of file DecodeParameter.cs.

◆ FromProto()

static DecodeParameter MyCaffe.param.beta.DecodeParameter.FromProto ( RawProto  rp)
static

Parses the parameter from a RawProto.

Parameters
rpSpecifies the RawProto to parse.
Returns
A new instance of the parameter is returned.

Definition at line 239 of file DecodeParameter.cs.

◆ Load()

override object MyCaffe.param.beta.DecodeParameter.Load ( System.IO.BinaryReader  br,
bool  bNewInstance = true 
)

Load the parameter from a binary reader.

Parameters
brSpecifies the binary reader.
bNewInstanceWhen true a new instance is created (the default), otherwise the existing instance is loaded from the binary reader.
Returns
Returns an instance of the parameter.

Definition at line 165 of file DecodeParameter.cs.

◆ ToProto()

override RawProto MyCaffe.param.beta.DecodeParameter.ToProto ( string  strName)
virtual

Convert the parameter into a RawProto.

Parameters
strNameSpecifies the name to associate with the RawProto.
Returns
The new RawProto is returned.

Implements MyCaffe.basecode.BaseParameter.

Definition at line 213 of file DecodeParameter.cs.

Property Documentation

◆ cache_size

int MyCaffe.param.beta.DecodeParameter.cache_size
getset

Specifies the size of the cache (in number of batches) used when calculating the CENTROID and KNN values (default = 300).

Definition at line 143 of file DecodeParameter.cs.

◆ centroid_output_iteration

int MyCaffe.param.beta.DecodeParameter.centroid_output_iteration
getset

Specifies the iteration where calculated centroids are output for each label, before this value, the centroids should not be used for their calculation is not complete (default = 300).

Definition at line 103 of file DecodeParameter.cs.

◆ enable_centroid_update

bool MyCaffe.param.beta.DecodeParameter.enable_centroid_update
getset

Specifies whether or not to update the centroids. For example in some cases a fixed centroid may be desired, such as is the case when initializing centroids with a PREGEN value.

Definition at line 93 of file DecodeParameter.cs.

◆ ignore_labels

List<int> MyCaffe.param.beta.DecodeParameter.ignore_labels
getset

Optionally, specifies one or more labels to ignore. (default = none, which then expects all labels).

Definition at line 123 of file DecodeParameter.cs.

◆ k

int MyCaffe.param.beta.DecodeParameter.k
getset

Optionally, specifies the K value to use with the KNN target (default = 5).

Definition at line 153 of file DecodeParameter.cs.

◆ output_centroids

bool MyCaffe.param.beta.DecodeParameter.output_centroids
getset

Optionally, specifies to output the centroids in top[1] (default = false).

Definition at line 113 of file DecodeParameter.cs.

◆ pregen_alpha

double MyCaffe.param.beta.DecodeParameter.pregen_alpha
getset

Specifies the pregen margin.

Definition at line 67 of file DecodeParameter.cs.

◆ pregen_label_count

int MyCaffe.param.beta.DecodeParameter.pregen_label_count
getset

Specifies the pre-generate target count, only used when 'target' = PREGEN.

When using a value > 0, the pre-gen target count must equal the label count for this setting directs the loss to first pre-generate equally distanced target encodings for each label and calculate the loss (and gradients) that move each labeled item toward those targets. This is usefule when initially training on a very small number of samples.

Definition at line 83 of file DecodeParameter.cs.

◆ target

TARGET MyCaffe.param.beta.DecodeParameter.target
getset

Optionally, specifies the target type to use (default = CENTROID).

Definition at line 133 of file DecodeParameter.cs.


The documentation for this class was generated from the following file: