MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
Specifies the parameter for the data layer. More...
Public Types | |
enum | DB { NONE = 0 , IMAGEDB = 1 } |
Defines the database type to use. More... | |
Public Types inherited from MyCaffe.param.LayerParameterBase | |
enum | LABEL_TYPE { NONE , SINGLE , MULTIPLE , ONLY_ONE } |
Defines the label type. More... | |
Public Member Functions | |
DataParameter () | |
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 DataParameter | FromProto (RawProto rp, DataParameter p=null) |
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 | |
string | source [getset] |
When used with the DATA parameter, specifies the data 'source' within the database. Some sources are used for training whereas others are used for testing. When used with the IMAGE_DATA parameter, the 'source' specifies the data 'source' file containing the list of image file names. Each dataset has both a training and testing data source. More... | |
virtual uint | batch_size [getset] |
Specifies the batch size. More... | |
DB | backend [getset] |
Specifies the backend database. More... | |
uint | prefetch [getset] |
Prefetch queue (Number of batches to prefetch to host memory, increase if data access bandwidth varies). More... | |
bool? | enable_random_selection [getset] |
(optional, default = null) Specifies whether or not to randomly query images from the data source. When enabled, images are queried in sequence which can often have poorer training results. More... | |
bool? | enable_pair_selection [getset] |
(optional, default = null) Specifies whether or not to select images in a pair sequence. When enabled, the first image queried is queried using the 'random' selection property, and then the second image queried is the image just after the first image queried (even if queried randomly). More... | |
bool | display_timing [getset] |
(optional, default = false) Specifies whether or not to display the timing of each image read. More... | |
LABEL_TYPE | label_type [getset] |
(optional, default = SINGLE) Specifies the label type: SINGLE - the default which uses the 'Label' field, or MULTIPLE - which uses the 'DataCriteria' field. More... | |
bool | primary_data [getset] |
(optional, default = true) Specifies whether or not the data is the primary datset as opposed to a secondary, target dataset. More... | |
bool | synchronize_target [getset] |
(optional, default = false) Specifies whether or not this is a to be synchronized with another data layer as the target. More... | |
string | synchronize_with [getset] |
(optional, default = null) Specifies a secondary (target) dataset to syncrhonize with. More... | |
int | images_per_blob [getset] |
(optional, default = 1) Specifies the number of images to load into each blob channel. For example when set to 2 two 3 channel images are loaded and stacked on the channel dimension, thus loading a 6 channel blob (2 images x 3 channels each). More... | |
bool | output_all_labels [getset] |
(optional, default = false) When using images_per_blob > 1, 'output_all_labels' specifies to output all labels for the stacked images instead of just the comparison. More... | |
bool | balance_matches [getset] |
(optional, default = true) When using images_per_blob > 1, 'balance_matches' specifies to query images by alternating similar matches followed by dissimilar matches in the next query. More... | |
bool | output_image_information [getset] |
(optional, default = false) When true image information such as index and label are output. IMPORTANT: enabling this setting can dramatically slow down training and is only used for debugging. More... | |
int | forced_primary_label [getset] |
(optional, default = -1) When >= 0, this label is used as the primary image label when 'images_per_blob' > 1. More... | |
bool | enable_noise_for_nonmatch [getset] |
(optional, default = false) When true an image consisting of noise initialized with noise filler. More... | |
DataNoiseParameter | data_noise_param [getset] |
Specifies the DataNoiseParameter used when 'enable_noise_for_nonmatch' = True. More... | |
bool | enable_debug_output [getset] |
(optional, default = false) When true the data sent out through the top are saved as images into the debug directory specified by the data_debug_param. More... | |
DataDebugParameter | data_debug_param [getset] |
Specifies the DataDebugParameter used when 'enable_debug_output' = True. More... | |
int | one_hot_label_size [getset] |
When greater than 0 (default = 0), labels are one-hot encoded to a vector of the one-hot label size (e.g., when size = 4: 3 -> 0 1 1 0; 4 -> 1 0 0 0) More... | |
Events | |
EventHandler< VerifyBatchSizeArgs > | OnVerifyBatchSize |
This event is, optionally, called to verify the batch size of the DataParameter. More... | |
Specifies the parameter for the data layer.
Note: given the new use of the Transformation Parameter, the depreciated elements of the DataParameter have been removed.
Definition at line 19 of file DataParameter.cs.
Defines the database type to use.
Enumerator | |
---|---|
NONE | Specifies that no backend database is used as is the case with the ImageDataLayer. |
IMAGEDB | Specifies to use the MyCaffeImageDatabase. Currently this is the only option. |
Definition at line 24 of file DataParameter.cs.
MyCaffe.param.DataParameter.DataParameter | ( | ) |
Constructor for the parameter.
Definition at line 64 of file DataParameter.cs.
|
virtual |
Creates a new copy of this instance of the parameter.
Implements MyCaffe.param.LayerParameterBase.
Definition at line 343 of file DataParameter.cs.
|
virtual |
Copy on parameter to another.
src | Specifies the parameter to copy. |
Implements MyCaffe.param.LayerParameterBase.
Definition at line 316 of file DataParameter.cs.
|
static |
Parses the parameter from a RawProto.
rp | Specifies the RawProto to parse. |
p | Optionally, specifies an instance to load. If null, a new instance is created and loaded. |
Definition at line 423 of file DataParameter.cs.
override object MyCaffe.param.DataParameter.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 304 of file DataParameter.cs.
|
virtual |
Convert the parameter into a RawProto.
strName | Specifies the name to associate with the RawProto. |
Implements MyCaffe.basecode.BaseParameter.
Definition at line 355 of file DataParameter.cs.
|
getset |
Specifies the backend database.
NOTE: Currently only the IMAGEDB is supported, which is a separate component used to load and manage all images within a given dataset.
Definition at line 107 of file DataParameter.cs.
|
getset |
(optional, default = true) When using images_per_blob > 1, 'balance_matches' specifies to query images by alternating similar matches followed by dissimilar matches in the next query.
Definition at line 227 of file DataParameter.cs.
|
getset |
Specifies the batch size.
Definition at line 82 of file DataParameter.cs.
|
getset |
Specifies the DataDebugParameter used when 'enable_debug_output' = True.
Definition at line 287 of file DataParameter.cs.
|
getset |
Specifies the DataNoiseParameter used when 'enable_noise_for_nonmatch' = True.
Definition at line 267 of file DataParameter.cs.
|
getset |
(optional, default = false) Specifies whether or not to display the timing of each image read.
Definition at line 148 of file DataParameter.cs.
|
getset |
(optional, default = false) When true the data sent out through the top are saved as images into the debug directory specified by the data_debug_param.
Definition at line 277 of file DataParameter.cs.
|
getset |
(optional, default = false) When true an image consisting of noise initialized with noise filler.
Definition at line 257 of file DataParameter.cs.
|
getset |
(optional, default = null) Specifies whether or not to select images in a pair sequence. When enabled, the first image queried is queried using the 'random' selection property, and then the second image queried is the image just after the first image queried (even if queried randomly).
Definition at line 138 of file DataParameter.cs.
|
getset |
(optional, default = null) Specifies whether or not to randomly query images from the data source. When enabled, images are queried in sequence which can often have poorer training results.
Definition at line 128 of file DataParameter.cs.
|
getset |
(optional, default = -1) When >= 0, this label is used as the primary image label when 'images_per_blob' > 1.
Definition at line 247 of file DataParameter.cs.
|
getset |
(optional, default = 1) Specifies the number of images to load into each blob channel. For example when set to 2 two 3 channel images are loaded and stacked on the channel dimension, thus loading a 6 channel blob (2 images x 3 channels each).
Loading images in pairs (images_per_blob = 2) is used with the siamese network, where the channel of each blob contains the first image followed by the second image. The total individual image channel count equals the blob channel count divided by 2.
Definition at line 207 of file DataParameter.cs.
|
getset |
(optional, default = SINGLE) Specifies the label type: SINGLE - the default which uses the 'Label' field, or MULTIPLE - which uses the 'DataCriteria' field.
Definition at line 158 of file DataParameter.cs.
|
getset |
When greater than 0 (default = 0), labels are one-hot encoded to a vector of the one-hot label size (e.g., when size = 4: 3 -> 0 1 1 0; 4 -> 1 0 0 0)
Definition at line 297 of file DataParameter.cs.
|
getset |
(optional, default = false) When using images_per_blob > 1, 'output_all_labels' specifies to output all labels for the stacked images instead of just the comparison.
Definition at line 217 of file DataParameter.cs.
|
getset |
(optional, default = false) When true image information such as index and label are output. IMPORTANT: enabling this setting can dramatically slow down training and is only used for debugging.
Definition at line 237 of file DataParameter.cs.
|
getset |
Prefetch queue (Number of batches to prefetch to host memory, increase if data access bandwidth varies).
Definition at line 118 of file DataParameter.cs.
|
getset |
(optional, default = true) Specifies whether or not the data is the primary datset as opposed to a secondary, target dataset.
Definition at line 168 of file DataParameter.cs.
|
getset |
When used with the DATA parameter, specifies the data 'source' within the database. Some sources are used for training whereas others are used for testing. When used with the IMAGE_DATA parameter, the 'source' specifies the data 'source' file containing the list of image file names. Each dataset has both a training and testing data source.
Definition at line 72 of file DataParameter.cs.
|
getset |
(optional, default = false) Specifies whether or not this is a to be synchronized with another data layer as the target.
Definition at line 178 of file DataParameter.cs.
|
getset |
(optional, default = null) Specifies a secondary (target) dataset to syncrhonize with.
When synchronizing with another dataset the ordering of labels is guaranteed to be the same from both data sets even though the images selected are selected at random.
Definition at line 192 of file DataParameter.cs.
EventHandler<VerifyBatchSizeArgs> MyCaffe.param.DataParameter.OnVerifyBatchSize |
This event is, optionally, called to verify the batch size of the DataParameter.
Definition at line 61 of file DataParameter.cs.