MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The ResNetOctConvModelBuilder is used to build Octave Convolution based RESNET models. More...
Public Types | |
enum | MODEL { RESNET26 } |
Defines the type of model to create. More... | |
Public Types inherited from MyCaffe.model.ModelBuilder | |
enum | SCALE_BIAS { NONE , SCALE , BIAS } |
Defines the scale bias type to use. More... | |
Public Member Functions | |
ResNetOctConvModelBuilder (string strBaseDirectory, string strDataset, List< Tuple< int, bool > > rgIpLayers, MODEL model, int nBatchSize=32, List< int > rgGpuId=null, NetParameter net=null) | |
The constructor. More... | |
override NetParameter | CreateDeployModel () |
Create the deploy model. More... | |
override NetParameter | CreateModel (bool bDeploy=false) |
Create the training model. More... | |
override SolverParameter | CreateSolver () |
Create the base solver to use. More... | |
Public Member Functions inherited from MyCaffe.model.ModelBuilder | |
ModelBuilder (string strBaseDir, NetParameter net=null, SolverParameter solver=null) | |
The constructor. More... | |
Protected Member Functions | |
LayerParameter | addOctConvBNLayer (string strInputLayer, string strOutputLayer, int nNumOutput, int nKernelSize, int nPad, int nStride, double dfAlphaIn, double dfAlphaOut, bool bUseBias=true, string strConvPrefix="", string strConvPostfix="", string strBnPrefix="", string strBnPostfix="_bn", string strLayerPostfix="", Phase phaseExclude=Phase.NONE) |
Add octave convolution, batch-norm layers. More... | |
override LayerParameter | addExtraLayers (bool bUseBatchNorm=true, double dfLrMult=1) |
Add an extra layer. 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 | |
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 ResNetOctConvModelBuilder is used to build Octave Convolution based RESNET models.
Definition at line 18 of file ResNetOctConvModelBuilder.cs.
Defines the type of model to create.
Enumerator | |
---|---|
RESNET26 | Create a ResNet26 model. |
Definition at line 42 of file ResNetOctConvModelBuilder.cs.
MyCaffe.model.ResNetOctConvModelBuilder.ResNetOctConvModelBuilder | ( | string | strBaseDirectory, |
string | strDataset, | ||
List< Tuple< int, bool > > | rgIpLayers, | ||
MODEL | model, | ||
int | nBatchSize = 32 , |
||
List< int > | rgGpuId = null , |
||
NetParameter | net = null |
||
) |
The constructor.
strBaseDirectory | Specifies the base directory that contains the data and models. |
strDataset | Specifies the dataset that the model will run on. |
rgIpLayers | Specifies a list of inner product layers added to the end of the network where each entry specifies the number of output and whether or not Noise is enabled for the layer. |
model | Specifies the type of ResNet model to create. |
nBatchSize | Optionally, specifies the batch size (default = 32). |
rgGpuId | Optionally, specifies a set of GPU ID's to use (when null, GPU=0 is used). |
net | Specifies the 'base' net parameter that is to be altered. |
Definition at line 60 of file ResNetOctConvModelBuilder.cs.
|
protectedvirtual |
Add an extra layer.
bUseBatchNorm | Not used. |
dfLrMult | Not used. |
Implements MyCaffe.model.ModelBuilder.
Definition at line 422 of file ResNetOctConvModelBuilder.cs.
|
protected |
Add octave convolution, batch-norm layers.
strInputLayer | Specifies the first input layer. |
strOutputLayer | Specifies the output layer. |
nNumOutput | Specifies the number of output. |
nKernelSize | Specifies the kernel size. |
nPad | Specifies the pad. |
nStride | Specifies the stride. |
dfAlphaIn | Specifies the alpha in. |
dfAlphaOut | Specifies the alpha out. |
bUseBias | Optionally, specifies to use bias (default = true). |
strConvPrefix | Optionally, specifies the convolution layer name prefix (default = ""). |
strConvPostfix | Optionally, specifies the convolution layer name postfix (default = ""). |
strBnPrefix | Optionally, specifies the batch-norm layer name prefix (default = ""). |
strBnPostfix | Optionally, specifies the batch-norm layer name postfix (default = "_bn"). |
strLayerPostfix | Optionally, specifies a layer name postfix (default = ""). |
phaseExclude | Optionally, specifies a phase to exclude (default = NONE). |
Definition at line 297 of file ResNetOctConvModelBuilder.cs.
|
virtual |
Create the deploy model.
Implements MyCaffe.model.ModelBuilder.
Definition at line 104 of file ResNetOctConvModelBuilder.cs.
|
virtual |
Create the training model.
bDeploy | Optionally, specifies to create a deployment model (default = false). |
Implements MyCaffe.model.ModelBuilder.
Definition at line 113 of file ResNetOctConvModelBuilder.cs.
|
virtual |
Create the base solver to use.
Implements MyCaffe.model.ModelBuilder.
Definition at line 387 of file ResNetOctConvModelBuilder.cs.