MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The SsdPascalModelBuilder adds the extra layers to a 'base' model for the Pascal model used with SSD. More...
Public Member Functions | |
SsdPascalModelBuilder (string strBaseDirectory, int nBatchSize=32, int nAccumBatchSize=32, List< int > rgGpuId=null, bool bUseBatchNorm=false, LossParameter.NormalizationMode normMode=LossParameter.NormalizationMode.VALID, NetParameter net=null) | |
The constructor. More... | |
override SolverParameter | CreateSolver () |
Create the base solver to use. More... | |
override NetParameter | CreateModel (bool bDeploy=false) |
Create the training SSD model for the pascal dataset. More... | |
override NetParameter | CreateDeployModel () |
Create the testing SSD model for the pascal dataset. More... | |
Public Member Functions inherited from MyCaffe.model.ModelBuilder | |
ModelBuilder (string strBaseDir, NetParameter net=null, SolverParameter solver=null) | |
The constructor. More... | |
Protected Member Functions | |
override LayerParameter | addExtraLayers (bool bUseBatchNorm=true, double dfLrMult=1) |
Add extra layers (for SSD with the Pascal dataset) on top of a 'base' network (e.g. VGGNet or Inception) More... | |
Protected Member Functions inherited from MyCaffe.model.ModelBuilder | |
string | getFileName (string strFile, string strSubDir) |
Returns the full path of the filename using the base directory original set when creating the ModelBuilder. More... | |
LayerParameter | findLayer (string strName) |
Find a layer with a given name. More... | |
NetParameter | createNet (string strName) |
Create the base network parameter for the model and set its name to the 'm_strModel' name. More... | |
LayerParameter | addDataLayer (string strSource, Phase phase, int nBatchSize=32, bool bOutputLabel=true, TransformationParameter transform=null, string strName="data", bool bSiamese=false) |
Add the Data layer. More... | |
LayerParameter | addAnnotatedDataLayer (string strSource, Phase phase, int nBatchSize=32, bool bOutputLabel=true, string strLabelMapFile="", SimpleDatum.ANNOTATION_TYPE anno_type=SimpleDatum.ANNOTATION_TYPE.NONE, TransformationParameter transform=null, List< BatchSampler > rgSampler=null) |
Add the Annotated Data layer. More... | |
List< LayerParameter > | createMultiBoxHead (LayerParameter data, int nNumClasses, List< MultiBoxHeadInfo > rgInfo, List< float > rgPriorVariance, bool bUseObjectness=false, bool bUseBatchNorm=true, double dfLrMult=1.0, bool useScale=true, int nImageHt=0, int nImageWd=0, bool bShareLocation=true, bool bFlip=true, bool bClip=true, double dfOffset=0.5, int nKernelSize=1, int nPad=0, string strConfPostfix="", string strLocPostfix="") |
Create the multi-box head layers. More... | |
LayerParameter | addConvBNLayer (string strInputLayer, string strOutputLayer, bool bUseBatchNorm, bool bUseRelU, int nNumOutput, int nKernelSize, int nPad, int nStride, double dfLrMult=1.0, int nDilation=1, SCALE_BIAS useScale=SCALE_BIAS.SCALE, string strConvPrefix="", string strConvPostfix="", string strBnPrefix="", string strBnPostfix="_bn", string strScalePrefix="", string strScalePostFix="_scale", string strBiasPrefix="", string strBiasPostfix="_bias", bool bNamedParams=false, string strLayerPostfix="", Phase phaseExclude=Phase.NONE) |
Add convolution, batch-norm layers. More... | |
LayerParameter | connectAndAddLayer (string fromLayer, LayerParameter toLayer, string fromLayer2=null) |
Connect the from layer to the 'to' layer. More... | |
LayerParameter | connectAndAddLayer (LayerParameter fromLayer, LayerParameter toLayer, bool bInPlace=false, bool bAdd=true, int nTopIdx=0) |
Connect the from layer to the 'to' layer. More... | |
LayerParameter | connectAndAddLayer (List< LayerParameter > rgFromLayer, LayerParameter toLayer, bool bAdd=true) |
Connect the from layer to the 'to' layer. More... | |
LayerParameter | createConvolution (string strName, int nNumOutput, int nKernelSize, int nPad=0, int nStride=1, int nDilation=1) |
Create a new convolution layer parameter. More... | |
LayerParameter | createPooling (string strName, PoolingParameter.PoolingMethod method, int nKernelSize, int nPad=0, int nStride=1) |
Create a new pooling layer parameter. More... | |
LayerParameter | addVGGBlock (LayerParameter lastLayer, int nBlockIdx, int nConvIdx, int nNumOutput, int nConvCount, bool? bNoPool, bool bDilatePool=false, int nKernelSize=3, int nPad=1, int nStride=1, int nDilation=1) |
Add a new VGG block. More... | |
LayerParameter | addVGGfc (LayerParameter lastLayer, int nBlockIdx, int nConvIdx, int nNumOutput, int nDilation, bool bDilated, bool bNoPool, bool bFullConv, bool bReduced, bool bDropout) |
Adds the final layers to the network. More... | |
LayerParameter | addVGGNetBody (LayerParameter lastLayer, bool bNeedFc=true, bool bFullConv=true, bool bReduced=true, bool bDilated=true, bool bNoPool=false, bool bDropout=false, List< string > rgstrFreezeLayers=null, bool bDilatePool4=false) |
Adds the full VGG body to the network, connecting it to the 'lastLayer'. More... | |
LayerParameter | addResBody (LayerParameter lastLayer, string strBlockName, int nOut2A, int nOut2B, int nOut2C, int nStride, bool bUseBranch1, int nDilation=1, bool bNamedParams=false, string strLayerPostfix="", Phase phaseExclude=Phase.NONE) |
Adds a ResNet body to the network, connecting it to the 'lastLayer'. More... | |
void | addExclusion (LayerParameter p, Phase phase) |
Add a phase exclusion. More... | |
LayerParameter | addResNetBody (string strDataName, int nBlock3Count=4, int nBlock4Count=23, bool bUsePool5=true, bool bUseDilationConv5=false, bool bNamedParams=false, string strLayerPostfix="", Phase phaseExclude=Phase.NONE) |
Create a ResNet101 Body. More... | |
Additional Inherited Members | |
Public Types inherited from MyCaffe.model.ModelBuilder | |
enum | SCALE_BIAS { NONE , SCALE , BIAS } |
Defines the scale bias type to use. More... | |
Protected Attributes inherited from MyCaffe.model.ModelBuilder | |
string | m_strBaseDir |
Specifies the base directory that contains the data and models. More... | |
NetParameter | m_net = new NetParameter() |
Specifies the base net to be altered. More... | |
SolverParameter | m_solver = new SolverParameter() |
Specifies the base solver to use. More... | |
Properties inherited from MyCaffe.model.ModelBuilder | |
NetParameter | Net [get] |
Returns the base net altered by the model builder. More... | |
SolverParameter | Solver [get] |
Returns the base solver. More... | |
The SsdPascalModelBuilder adds the extra layers to a 'base' model for the Pascal model used with SSD.
Definition at line 15 of file SsdPascalModelBuilder.cs.
MyCaffe.model.SsdPascalModelBuilder.SsdPascalModelBuilder | ( | string | strBaseDirectory, |
int | nBatchSize = 32 , |
||
int | nAccumBatchSize = 32 , |
||
List< int > | rgGpuId = null , |
||
bool | bUseBatchNorm = false , |
||
LossParameter.NormalizationMode | normMode = LossParameter.NormalizationMode.VALID , |
||
NetParameter | net = null |
||
) |
The constructor.
strBaseDirectory | Specifies the base directory that contains the data and models. |
nBatchSize | Optionally, specifies the batch size (default = 32). |
nAccumBatchSize | Optionally, specifies the accumulation batch size (default = 32). |
rgGpuId | Optionally, specifies a set of GPU ID's to use (when null, GPU=0 is used). |
bUseBatchNorm | Optionally, specifies to use batch normalization (default = false). |
normMode | Optionally, specifies the normalization mode (default = VALID). |
net | Specifies the 'base' net parameter that is to be altered. |
Definition at line 70 of file SsdPascalModelBuilder.cs.
|
protectedvirtual |
Add extra layers (for SSD with the Pascal dataset) on top of a 'base' network (e.g. VGGNet or Inception)
bUseBatchNorm | Optionally, specifies whether or not to use batch normalization layers (default = true). |
dfLrMult | Optionally, specifies the learning rate multiplier (default = 1.0). |
Implements MyCaffe.model.ModelBuilder.
Definition at line 488 of file SsdPascalModelBuilder.cs.
|
virtual |
Create the testing SSD model for the pascal dataset.
Implements MyCaffe.model.ModelBuilder.
Definition at line 478 of file SsdPascalModelBuilder.cs.
|
virtual |
Create the training SSD model for the pascal dataset.
Implements MyCaffe.model.ModelBuilder.
Definition at line 355 of file SsdPascalModelBuilder.cs.
|
virtual |
Create the base solver to use.
Implements MyCaffe.model.ModelBuilder.
Definition at line 322 of file SsdPascalModelBuilder.cs.