MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The IXMyCaffe interface contains functions used to perform MyCaffe operations that work with the MyCaffeImageDatabase. More...
Public Member Functions | |
bool | Load (Phase phase, ProjectEx p, DB_LABEL_SELECTION_METHOD? labelSelectionOverride=null, DB_ITEM_SELECTION_METHOD? itemSelectionOverride=null, bool bResetFirst=false, IXDatabaseBase db=null, bool bUseDb=true, bool bCreateRunNet=true, string strStage=null, bool bEnableMemTrace=false) |
Load a project and optionally the MyCaffeImageDatabase. More... | |
bool | Load (Phase phase, string strSolver, string strModel, byte[] rgWeights, DB_LABEL_SELECTION_METHOD? labelSelectionOverride=null, DB_ITEM_SELECTION_METHOD? itemSelectionOverride=null, bool bResetFirst=false, IXDatabaseBase db=null, bool bUseDb=true, bool bCreateRunNet=true, string strStage=null, bool bEnableMemTrace=false) |
Load a project and optionally the MyCaffeImageDatabase. More... | |
void | Unload (bool bUnloadDb=true, bool bIgnoreExceptions=false) |
Unload the currently loaded project. More... | |
void | Train (int nIterationOverride=-1, int nTrainingTimeLimitInMinutes=0, TRAIN_STEP step=TRAIN_STEP.NONE, double dfLearningRateOverride=0, bool bReset=false) |
Train the network a set number of iterations and allow for single stepping. More... | |
double | Test (int nIterationOverride=-1) |
Test the network a given number of iterations. More... | |
PropertySet | TestMany (PropertySet customInput) |
Runs test many on a set of custom input data. More... | |
List< Tuple< SimpleDatum, ResultCollection > > | TestMany (int nCount, bool bOnTrainingSet, bool bOnTargetSet=false, DB_ITEM_SELECTION_METHOD imgSelMethod=DB_ITEM_SELECTION_METHOD.RANDOM, int nImageStartIdx=0, DateTime? dtImageStartTime=null, double? dfThreshold=null) |
Test on a number of images by selecting random images from the database, running them through the Run network, and then comparing the results with the expected results. More... | |
ResultCollection | Run (int nImageIdx, bool bPad=true) |
Run on a given image in the MyCaffeImageDatabase based on its image index. More... | |
List< ResultCollection > | Run (List< int > rgImageIdx) |
Run on a set of images in the MyCaffeImageDatabase based on their image indexes. More... | |
ResultCollection | Run (SimpleDatum d, bool bSort=true, bool bUseSolverNet=false) |
Run on a given Datum. More... | |
Bitmap | GetTestImage (Phase phase, out int nLabel, out string strLabel) |
Retrieves a random image from either the training or test set depending on the Phase specified. More... | |
Bitmap | GetTestImage (Phase phase, int nLabel) |
Retrieves a random image from either the training or test set depending on the Phase specified. More... | |
SimpleDatum | GetItemMean () |
Returns the image mean used by the solver network used during training. More... | |
DatasetDescriptor | GetDataset () |
Returns the current dataset used when training and testing. More... | |
byte[] | GetWeights () |
Retrieves the weights of the training network. More... | |
void | UpdateRunWeights (bool bOutputStatus=false, bool bVerifyWeights=true) |
Loads the weights from the training net into the Net used for running. More... | |
void | UpdateWeights (byte[] rgWeights) |
Loads the training Net with new weights. More... | |
string | GetLicenseText (string strOtherLicenses) |
Returns the license text for MyCaffe. More... | |
The IXMyCaffe interface contains functions used to perform MyCaffe operations that work with the MyCaffeImageDatabase.
T | Specifies the base type float or double. Using float is recommended to conserve GPU memory. |
Definition at line 409 of file Interfaces.cs.
DatasetDescriptor MyCaffe.common.IXMyCaffe< T >.GetDataset | ( | ) |
Returns the current dataset used when training and testing.
Implemented in MyCaffe.MyCaffeControl< T >.
SimpleDatum MyCaffe.common.IXMyCaffe< T >.GetItemMean | ( | ) |
Returns the image mean used by the solver network used during training.
Implemented in MyCaffe.MyCaffeControl< T >.
string MyCaffe.common.IXMyCaffe< T >.GetLicenseText | ( | string | strOtherLicenses | ) |
Returns the license text for MyCaffe.
strOtherLicenses | Specifies other licenses to append to the license text. |
Implemented in MyCaffe.MyCaffeControl< T >.
Bitmap MyCaffe.common.IXMyCaffe< T >.GetTestImage | ( | Phase | phase, |
int | nLabel | ||
) |
Retrieves a random image from either the training or test set depending on the Phase specified.
phase | Specifies whether to select images from the training set or testing set. |
nLabel | Returns the expected label for the image. |
Implemented in MyCaffe.MyCaffeControl< T >.
Bitmap MyCaffe.common.IXMyCaffe< T >.GetTestImage | ( | Phase | phase, |
out int | nLabel, | ||
out string | strLabel | ||
) |
Retrieves a random image from either the training or test set depending on the Phase specified.
phase | Specifies whether to select images from the training set or testing set. |
nLabel | Returns the expected label for the image. |
strLabel | Returns the expected label name for the image. |
Implemented in MyCaffe.MyCaffeControl< T >.
byte[] MyCaffe.common.IXMyCaffe< T >.GetWeights | ( | ) |
Retrieves the weights of the training network.
Implemented in MyCaffe.MyCaffeControl< T >.
bool MyCaffe.common.IXMyCaffe< T >.Load | ( | Phase | phase, |
ProjectEx | p, | ||
DB_LABEL_SELECTION_METHOD? | labelSelectionOverride = null , |
||
DB_ITEM_SELECTION_METHOD? | itemSelectionOverride = null , |
||
bool | bResetFirst = false , |
||
IXDatabaseBase | db = null , |
||
bool | bUseDb = true , |
||
bool | bCreateRunNet = true , |
||
string | strStage = null , |
||
bool | bEnableMemTrace = false |
||
) |
Load a project and optionally the MyCaffeImageDatabase.
This load function uses the MyCaffeImageDatabase.
phase | Specifies the Phase for which the load should focus. |
p | Specifies the Project to load. |
labelSelectionOverride | Optionally, specifies the label selection override (overides the label selection in SettingsCaffe). The label selection dictates how the label sets are selected. |
itemSelectionOverride | Optionally, specifies the item (e.g., image or temporal item) selection override (overides the item selection in SettingsCaffe). The item selection dictates how the items are selected from each label set. |
bResetFirst | Optionally, resets the device before loading. IMPORTANT: this functionality is only recommendned during testing, for resetting the device will throw off all other users of the device. |
db | Optionally, specifies the in-memory MyCaffeDatabase to use. When null, an instance if the in-memory MyCaffeDatabase is created internally based on the 'dbVer'. |
bUseDb | Optionally, specifies to use the in-memory database if not null. |
bCreateRunNet | Optionally, specifies whether or not to create the Run net. |
strStage | Optionally, specifies the stage under which to load the model. |
bEnableMemTrace | Optionally, specifies to enable the memory tracing (only available in debug builds). |
Implemented in MyCaffe.MyCaffeControl< T >.
bool MyCaffe.common.IXMyCaffe< T >.Load | ( | Phase | phase, |
string | strSolver, | ||
string | strModel, | ||
byte[] | rgWeights, | ||
DB_LABEL_SELECTION_METHOD? | labelSelectionOverride = null , |
||
DB_ITEM_SELECTION_METHOD? | itemSelectionOverride = null , |
||
bool | bResetFirst = false , |
||
IXDatabaseBase | db = null , |
||
bool | bUseDb = true , |
||
bool | bCreateRunNet = true , |
||
string | strStage = null , |
||
bool | bEnableMemTrace = false |
||
) |
Load a project and optionally the MyCaffeImageDatabase.
This load function uses the MyCaffeImageDatabase.
phase | Specifies the Phase for which the load should focus. |
strSolver | Specifies the solver descriptor. |
strModel | Specifies the model desciptor. |
rgWeights | Optionally, specifies the weights to load, or null to ignore. |
labelSelectionOverride | Optionally, specifies the label selection override (overides the label selection in SettingsCaffe). The label selection dictates how the label sets are selected. |
itemSelectionOverride | Optionally, specifies the item (e.g., image or temporal item) selection override (overides the item selection in SettingsCaffe). The item selection dictates how the items are selected from each label set. |
bResetFirst | Optionally, resets the device before loading. IMPORTANT: this functionality is only recommendned during testing, for resetting the device will throw off all other users of the device. |
db | Optionally, specifies the in-memory MyCaffeDatabase to use. When null, an instance if the in-memory MyCaffeDatabase is created internally based on the 'dbVer'. |
bUseDb | Optionally, specifies to use the in-memory database if not null. |
bCreateRunNet | Optionally, specifies whether or not to create the Run net. |
strStage | Optionally, specifies the stage under which to load the model. |
bEnableMemTrace | Optionally, specifies to enable the memory tracing (only available in debug builds). |
Implemented in MyCaffe.MyCaffeControl< T >.
ResultCollection MyCaffe.common.IXMyCaffe< T >.Run | ( | int | nImageIdx, |
bool | bPad = true |
||
) |
Run on a given image in the MyCaffeImageDatabase based on its image index.
nImageIdx | Specifies the image index. |
bPad | Optionally, pad with an extra image (default = true). |
Implemented in MyCaffe.MyCaffeControl< T >.
List< ResultCollection > MyCaffe.common.IXMyCaffe< T >.Run | ( | List< int > | rgImageIdx | ) |
Run on a set of images in the MyCaffeImageDatabase based on their image indexes.
rgImageIdx | Specifies a list of image indexes. |
Implemented in MyCaffe.MyCaffeControl< T >.
ResultCollection MyCaffe.common.IXMyCaffe< T >.Run | ( | SimpleDatum | d, |
bool | bSort = true , |
||
bool | bUseSolverNet = false |
||
) |
Run on a given Datum.
d | Specifies the Datum to run. |
bSort | Optionally, specifies whether or not to sor the results. |
bUseSolverNet | Optionally, specifies whether or not to use the training net vs. the run net. |
Implemented in MyCaffe.MyCaffeControl< T >.
double MyCaffe.common.IXMyCaffe< T >.Test | ( | int | nIterationOverride = -1 | ) |
Test the network a given number of iterations.
nIterationOverride | Optionally, specifies number of iterations to run that override the iterations specified in the solver desctiptor. |
Implemented in MyCaffe.MyCaffeControl< T >.
List< Tuple< SimpleDatum, ResultCollection > > MyCaffe.common.IXMyCaffe< T >.TestMany | ( | int | nCount, |
bool | bOnTrainingSet, | ||
bool | bOnTargetSet = false , |
||
DB_ITEM_SELECTION_METHOD | imgSelMethod = DB_ITEM_SELECTION_METHOD.RANDOM , |
||
int | nImageStartIdx = 0 , |
||
DateTime? | dtImageStartTime = null , |
||
double? | dfThreshold = null |
||
) |
Test on a number of images by selecting random images from the database, running them through the Run network, and then comparing the results with the expected results.
nCount | Specifies the number of cycles to run. |
bOnTrainingSet | Specifies on whether to select images from the training set, or when false the testing set of data. |
bOnTargetSet | Optionally, specifies to test on the target dataset (if exists) as opposed to the source dataset. |
imgSelMethod | Optionally, specifies the image selection method (default = RANDOM). |
nImageStartIdx | Optionally, specifies the image start index (default = 0). |
dtImageStartTime | Optionally, specifies the image start time (default = null). Note either the 'nImageStartIdx' or 'dtImageStartTime' may be used, but not both. |
dfThreshold | Optionally, specifies a threshold where the winning selection must also be above the threshold in score. |
Implemented in MyCaffe.MyCaffeControl< T >.
PropertySet MyCaffe.common.IXMyCaffe< T >.TestMany | ( | PropertySet | customInput | ) |
Runs test many on a set of custom input data.
customInput | Specifies the custom input data, each separated by ';'. |
Implemented in MyCaffe.MyCaffeControl< T >.
void MyCaffe.common.IXMyCaffe< T >.Train | ( | int | nIterationOverride = -1 , |
int | nTrainingTimeLimitInMinutes = 0 , |
||
TRAIN_STEP | step = TRAIN_STEP.NONE , |
||
double | dfLearningRateOverride = 0 , |
||
bool | bReset = false |
||
) |
Train the network a set number of iterations and allow for single stepping.
nIterationOverride | Optionally, specifies number of iterations to run that override the iterations specified in the solver desctiptor. |
nTrainingTimeLimitInMinutes | Optionally, specifies a maximum number of minutes to train. When set to 0, this parameter is ignored and no time limit is imposed. |
step | Optionally, specifies whether or not to single step the training on the forward pass, backward pass or both. The default is TRAIN_STEP.NONE which runs the training to the maximum number of iterations specified. |
dfLearningRateOverride | Optionally, specifies a learning rate override (default = 0 which ignores this parameter) |
bReset | Optionally, reset the iterations to zero. |
Implemented in MyCaffe.MyCaffeControl< T >.
void MyCaffe.common.IXMyCaffe< T >.Unload | ( | bool | bUnloadDb = true , |
bool | bIgnoreExceptions = false |
||
) |
Unload the currently loaded project.
bUnloadDb | Optionally, specifies whether or not to unload the in-memory database. The default = true. |
bIgnoreExceptions | Optionally, specifies to ignore exceptions that occur (default = false). |
Implemented in MyCaffe.MyCaffeControl< T >.
void MyCaffe.common.IXMyCaffe< T >.UpdateRunWeights | ( | bool | bOutputStatus = false , |
bool | bVerifyWeights = true |
||
) |
Loads the weights from the training net into the Net used for running.
bOutputStatus | Optionally, specifies whether or not the status is output as the weights are updated (default = false). |
bVerifyWeights | Optionally, specifies to verify the updated weights (default = true). |
Implemented in MyCaffe.MyCaffeControl< T >.
void MyCaffe.common.IXMyCaffe< T >.UpdateWeights | ( | byte[] | rgWeights | ) |
Loads the training Net with new weights.
rgWeights | Specifies the weights to load. |
Implemented in MyCaffe.MyCaffeControl< T >.