MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
Stores parameters used to apply transformation to the data layer's data. More...
Public Types | |
enum | SCALE_OPERATOR { NONE , MUL , POW } |
Defines the type of scale operator to use (if any). More... | |
enum | COLOR_ORDER { RGB = 0 , BGR = 1 } |
Defines the color ordering used to tranform the input data. More... | |
Public Types inherited from MyCaffe.param.LayerParameterBase | |
enum | LABEL_TYPE { NONE , SINGLE , MULTIPLE , ONLY_ONE } |
Defines the label type. More... | |
Public Member Functions | |
TransformationParameter () | |
The constructor. 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 TransformationParameter | 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 | forced_positive_range_max [getset] |
Specifies whether or not to fit the data into a forced range of [0, forced_positive_range_max]. More... | |
double | scale [getset] |
For data pre-processing, we can do simple scaling and subtracting the data mean, if provided. Note that the mean subtraction is always carried out before scaling. More... | |
SCALE_OPERATOR? | scale_operator [getset] |
Get/set the scale operator used to apply the scale value to the data-mean or data result. More... | |
bool | mirror [getset] |
Specify if we want to randomly mirror the data. More... | |
uint | crop_size [getset] |
Specify if we would like to randomly crop an image. More... | |
bool | use_imagedb_mean [getset] |
Specifies whether to subtract the mean image from the image database, subtract the mean values, or neither and do no mean subtraction. More... | |
List< double > | mean_value [getset] |
If specified can be repeated once (would subtract it from all the channels or can be repeated the same number of times as channels (would subtract them from the corresponding channel). More... | |
bool | force_color [getset] |
Force the decoded image to have 3 color channels. More... | |
bool | force_gray [getset] |
Force the decoded image to have 1 color channel. More... | |
int? | random_seed [getset] |
Only used during testing. More... | |
string | mean_file [getset] |
Specifies the path to file containing the image mean in the proto buffer format of a BlobProto. More... | |
COLOR_ORDER | color_order [getset] |
Specifies the color ordering to use. Native Caffe models often uses COLOR_ORDER.BGR, whereas MyCaffe datasets often uses the COLOR_ORDER.RGB ordering. More... | |
ResizeParameter | resize_param [getset] |
Optionally, specifies the resize policy, otherwise this is null. More... | |
NoiseParameter | noise_param [getset] |
Optionally, specifies the noise policy, otherwise this is null. More... | |
DistortionParameter | distortion_param [getset] |
Optionally, specifies the distortion policy, otherwise this is null. More... | |
ExpansionParameter | expansion_param [getset] |
Optionally, specifies the expansion policy, otherwise this is null. More... | |
EmitConstraint | emit_constraint [getset] |
Optionally, specifies the emit constraint on emitting annotation after transformation, otherwise this is null. More... | |
MaskParameter | mask_param [getset] |
Optionally, specifies the image mask which defines the boundary area that is set to black on the image thus masking that area out. More... | |
DataLabelMappingParameter | label_mapping [getset] |
Optionally, specifies the label mapping which defines how to map lables when calling the DataTransformer.TransformLabel method. More... | |
Stores parameters used to apply transformation to the data layer's data.
Definition at line 18 of file TransformationParameter.cs.
Defines the color ordering used to tranform the input data.
Enumerator | |
---|---|
RGB | Orders the channels by 'R'ed, 'G'reen, then 'B'lue. |
BGR | Orders the channels by 'B'lue, 'G'reen, then 'R'ed. This ordering is typically used by Native C++ Caffe. |
Definition at line 62 of file TransformationParameter.cs.
Defines the type of scale operator to use (if any).
Definition at line 43 of file TransformationParameter.cs.
MyCaffe.param.TransformationParameter.TransformationParameter | ( | ) |
The constructor.
Definition at line 77 of file TransformationParameter.cs.
|
virtual |
Creates a new copy of this instance of the parameter.
Implements MyCaffe.param.LayerParameterBase.
Definition at line 352 of file TransformationParameter.cs.
|
virtual |
Copy on parameter to another.
src | Specifies the parameter to copy. |
Implements MyCaffe.param.LayerParameterBase.
Definition at line 321 of file TransformationParameter.cs.
|
static |
Parses the parameter from a RawProto.
rp | Specifies the RawProto to parse. |
Definition at line 428 of file TransformationParameter.cs.
override object MyCaffe.param.TransformationParameter.Load | ( | System.IO.BinaryReader | br, |
bool | bNewInstance = true |
||
) |
Load the parameter from a binary reader.
br | Specifies the binary reader. |
bNewInstance | When true a new instance is created (the default), otherwise the existing instance is loaded from the binary reader. |
Definition at line 309 of file TransformationParameter.cs.
|
virtual |
Convert the parameter into a RawProto.
strName | Specifies the name to associate with the RawProto. |
Implements MyCaffe.basecode.BaseParameter.
Definition at line 364 of file TransformationParameter.cs.
|
getset |
Specifies the color ordering to use. Native Caffe models often uses COLOR_ORDER.BGR, whereas MyCaffe datasets often uses the COLOR_ORDER.RGB ordering.
Definition at line 210 of file TransformationParameter.cs.
|
getset |
Specify if we would like to randomly crop an image.
Definition at line 127 of file TransformationParameter.cs.
|
getset |
Optionally, specifies the distortion policy, otherwise this is null.
Currently, this parameter is only used by the AnnotatedDataLayer.
Definition at line 249 of file TransformationParameter.cs.
|
getset |
Optionally, specifies the emit constraint on emitting annotation after transformation, otherwise this is null.
Currently, this parameter is only used by the AnnotatedDataLayer.
Definition at line 275 of file TransformationParameter.cs.
|
getset |
Optionally, specifies the expansion policy, otherwise this is null.
Currently, this parameter is only used by the AnnotatedDataLayer.
Definition at line 262 of file TransformationParameter.cs.
|
getset |
Force the decoded image to have 3 color channels.
Definition at line 165 of file TransformationParameter.cs.
|
getset |
Force the decoded image to have 1 color channel.
Definition at line 175 of file TransformationParameter.cs.
|
getset |
Specifies whether or not to fit the data into a forced range of [0, forced_positive_range_max].
Definition at line 86 of file TransformationParameter.cs.
|
getset |
Optionally, specifies the label mapping which defines how to map lables when calling the DataTransformer.TransformLabel method.
Currently, this parameter is only used by the DataLayer.
Definition at line 302 of file TransformationParameter.cs.
|
getset |
Optionally, specifies the image mask which defines the boundary area that is set to black on the image thus masking that area out.
The mask is applied last, after all other alterations are made.
Currently, this parameter is only used by the DataLayer.
Definition at line 290 of file TransformationParameter.cs.
|
getset |
Specifies the path to file containing the image mean in the proto buffer format of a BlobProto.
The mean file is used when specified and the 'use_imagedb_mean' = true. If the 'use_imagedb_mean' = true and the mean file is not set, the Caffe Image Database is queried for the calculated mean image.
Definition at line 199 of file TransformationParameter.cs.
|
getset |
If specified can be repeated once (would subtract it from all the channels or can be repeated the same number of times as channels (would subtract them from the corresponding channel).
So for example if there are 3 channels, mean_value could have 3 values, one for each channel – or just one value which would be applied to all channels.
Definition at line 155 of file TransformationParameter.cs.
|
getset |
Specify if we want to randomly mirror the data.
Definition at line 117 of file TransformationParameter.cs.
|
getset |
Optionally, specifies the noise policy, otherwise this is null.
Currently, this parameter is only used by the DataLayer.
Definition at line 236 of file TransformationParameter.cs.
|
getset |
Only used during testing.
Definition at line 185 of file TransformationParameter.cs.
|
getset |
Optionally, specifies the resize policy, otherwise this is null.
Currently, this parameter is only used by the AnnotatedDataLayer.
Definition at line 223 of file TransformationParameter.cs.
|
getset |
For data pre-processing, we can do simple scaling and subtracting the data mean, if provided. Note that the mean subtraction is always carried out before scaling.
Definition at line 98 of file TransformationParameter.cs.
|
getset |
Get/set the scale operator used to apply the scale value to the data-mean or data result.
Definition at line 107 of file TransformationParameter.cs.
|
getset |
Specifies whether to subtract the mean image from the image database, subtract the mean values, or neither and do no mean subtraction.
Definition at line 138 of file TransformationParameter.cs.