MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.model.ModelBuilder Class Referenceabstract

The ModelBuilder is an abstract class that is overridden by a base class used to programically build new models. More...

Inheritance diagram for MyCaffe.model.ModelBuilder:
MyCaffe.model.ResNetModelBuilder MyCaffe.model.ResNetOctConvModelBuilder MyCaffe.model.SsdPascalModelBuilder

Public Types

enum  SCALE_BIAS { NONE , SCALE , BIAS }
 Defines the scale bias type to use. More...
 

Public Member Functions

 ModelBuilder (string strBaseDir, NetParameter net=null, SolverParameter solver=null)
 The constructor. More...
 
abstract SolverParameter CreateSolver ()
 Create the base solver to use. More...
 
abstract NetParameter CreateModel (bool bDeploy=false)
 Create the training/testing/deploy model to use. More...
 
abstract NetParameter CreateDeployModel ()
 Create the deploy model to use. More...
 

Protected Member Functions

string getFileName (string strFile, string strSubDir)
 Returns the full path of the filename using the base directory original set when creating the ModelBuilder. More...
 
abstract LayerParameter addExtraLayers (bool bUseBatchNorm=true, double dfLrMult=1.0)
 Add extra layers on top of a 'base' network (e.g. VGGNet or Inception) 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< LayerParametercreateMultiBoxHead (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...
 

Protected Attributes

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

NetParameter Net [get]
 Returns the base net altered by the model builder. More...
 
SolverParameter Solver [get]
 Returns the base solver. More...
 

Detailed Description

The ModelBuilder is an abstract class that is overridden by a base class used to programically build new models.

Definition at line 18 of file ModelBuilder.cs.

Member Enumeration Documentation

◆ SCALE_BIAS

Defines the scale bias type to use.

Enumerator
NONE 

Specifies to not use the scale or bias.

SCALE 

Specifies to use the scale.

BIAS 

Specifies to use the bias.

Definition at line 36 of file ModelBuilder.cs.

Constructor & Destructor Documentation

◆ ModelBuilder()

MyCaffe.model.ModelBuilder.ModelBuilder ( string  strBaseDir,
NetParameter  net = null,
SolverParameter  solver = null 
)

The constructor.

Parameters
strBaseDirSpecifies the base directory that contains the data and models.
netOptionally, specifies the 'base' net parameter that is to be altered (default = null).
solverOptionally, specifies the 'base' solver parameter to use (default = null).

Definition at line 58 of file ModelBuilder.cs.

Member Function Documentation

◆ addAnnotatedDataLayer()

LayerParameter MyCaffe.model.ModelBuilder.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 
)
protected

Add the Annotated Data layer.

Parameters
strSourceSpecifies the data source.
phaseSpecifies the phase under which to run the layer (e.g. TRAIN, TEST, RUN).
nBatchSizeOptionally, specifies the batch size (default = 32).
bOutputLabelOptionally, specifies whether or not to output the label (default = true).
strLabelMapFileOptionally, specifies the label file (default = "").
anno_typeOptionally, specifies the annotation type (default = NONE).
transformOptionally, specifies the transformation parameter (default = null, ignored).
rgSamplerOptionally, specifies the list of batch samplers (default = null, ignored).
Returns
The annotated data layer is retunred after it is added to the network.

Definition at line 192 of file ModelBuilder.cs.

◆ addConvBNLayer()

LayerParameter MyCaffe.model.ModelBuilder.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 
)
protected

Add convolution, batch-norm layers.

Parameters
strInputLayerSpecifies the input layer.
strOutputLayerSpecifies the output layer.
bUseBatchNormOptionally, specifies whether or not to use a batch-norm layer.
bUseRelUSpecifies whether or not to add a RelU layer.
nNumOutputSpecifies the number of output.
nKernelSizeSpecifies the kernel size.
nPadSpecifies the pad.
nStrideSpecifies the stride.
dfLrMultOptionally, specifies the default learning rate multiplier (default = 1.0).
nDilationOptionally, specifies the dilation (default = 1).
useScaleOptionally, specifies whether or not to use a ScaleLayer or BiasLayer (default = SCALE).
strConvPrefixOptionally, specifies the convolution layer name prefix (default = "").
strConvPostfixOptionally, specifies the convolution layer name postfix (default = "").
strBnPrefixOptionally, specifies the batch-norm layer name prefix (default = "").
strBnPostfixOptionally, specifies the batch-norm layer name postfix (default = "_bn").
strScalePrefixOptionally, specifies the scale layer name prefix (default = "").
strScalePostFixOptionally, specifies the scale layer name postfix (default = "_scale")
strBiasPrefixOptionally, specifies the bias layer name prefix (default = "").
strBiasPostfixOptionally, specifies the bias layer name postfix (default = "_bias").
bNamedParamsOptionally, specifies to name the parameters (default = false).
strLayerPostfixOptionally, specifies a layer name postfix (default = "").
phaseExcludeOptionally, specifies a phase to exclude (default = NONE).
Returns
The last layer added is returned.

Definition at line 491 of file ModelBuilder.cs.

◆ addDataLayer()

LayerParameter MyCaffe.model.ModelBuilder.addDataLayer ( string  strSource,
Phase  phase,
int  nBatchSize = 32,
bool  bOutputLabel = true,
TransformationParameter  transform = null,
string  strName = "data",
bool  bSiamese = false 
)
protected

Add the Data layer.

Parameters
strSourceSpecifies the data source.
phaseSpecifies the phase under which to run the layer (e.g. TRAIN, TEST, RUN).
nBatchSizeOptionally, specifies the batch size (default = 32).
bOutputLabelOptionally, specifies whether or not to output the label (default = true).
transformOptionally, specifies the transformation parameter (default = null, ignored).
strNameOptionally, specifies a name for the layer and data top name (default = "data").
bSiameseOptionally, specifies to add data layers for a Siamese net (default = false).
Returns
The Data layer is retunred after it is added to the network.

Definition at line 149 of file ModelBuilder.cs.

◆ addExclusion()

void MyCaffe.model.ModelBuilder.addExclusion ( LayerParameter  p,
Phase  phase 
)
protected

Add a phase exclusion.

Parameters
pSpecifies the layer parameter to alter.
phaseSpecifies the phase to exclude, or NONE to ignore.

Definition at line 1025 of file ModelBuilder.cs.

◆ addExtraLayers()

abstract LayerParameter MyCaffe.model.ModelBuilder.addExtraLayers ( bool  bUseBatchNorm = true,
double  dfLrMult = 1.0 
)
protectedpure virtual

Add extra layers on top of a 'base' network (e.g. VGGNet or Inception)

Parameters
bUseBatchNormOptionally, specifies whether or not to use batch normalization layers (default = true).
dfLrMultOptionally, specifies the learning rate multiplier (default = 1.0).

Implemented in MyCaffe.model.ResNetModelBuilder, MyCaffe.model.ResNetOctConvModelBuilder, and MyCaffe.model.SsdPascalModelBuilder.

◆ addResBody()

LayerParameter MyCaffe.model.ModelBuilder.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 
)
protected

Adds a ResNet body to the network, connecting it to the 'lastLayer'.

Parameters
lastLayerSpecifies the layer to connect the ResNet net to.
strBlockNameSpecifies the block name.
nOut2ASpecifies the output of the first branch.
nOut2BSpecifies the output of the second branch.
nOut2CSpecifies the output of the third branch.
nStrideSpecifies the stride used in the first branch.
bUseBranch1Specifies whether or not to use the first branch.
nDilationSpecifies the dilation used in all branches.
bNamedParamsOptionally, specifies to name the parameters (default = false).
strLayerPostfixOptionally, specifies a layer name postfix (default = "").
phaseExcludeOptionally, specifies a phase to exclude (default = NONE).
Returns
The last layer added is returned.

Definition at line 959 of file ModelBuilder.cs.

◆ addResNetBody()

LayerParameter MyCaffe.model.ModelBuilder.addResNetBody ( string  strDataName,
int  nBlock3Count = 4,
int  nBlock4Count = 23,
bool  bUsePool5 = true,
bool  bUseDilationConv5 = false,
bool  bNamedParams = false,
string  strLayerPostfix = "",
Phase  phaseExclude = Phase.NONE 
)
protected

Create a ResNet101 Body.

Parameters
strDataNameSpecifies the last layer name where the ResNet body is to be created from.
nBlock3CountSpecifies the number of blocks in the 3 blocks (default = 4 for ResNet101, use 8 for ResNet152).
nBlock4CountSpeciifes the number of blocks in the 4 blocks (default = 23 for ResNet101, use 36 for ResNet152).
bUsePool5Specifies whether or not a Pooling layer is to be used as the last layer.
bUseDilationConv5Specifies whether or not to use dilation on the level 5 block.
bNamedParamsSpecifies whether or not to name the parameters (default = false).
strLayerPostfixSpecifies a layer name post-fix (default = "").
phaseExcludeSpecifies a phase to exclude, or NONE to ignore (default = NONE).
Returns
The last layer is returned.

Definition at line 1048 of file ModelBuilder.cs.

◆ addVGGBlock()

LayerParameter MyCaffe.model.ModelBuilder.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 
)
protected

Add a new VGG block.

Parameters
lastLayerSpecifies the last layer that this block is to be connected to.
nBlockIdxSpecifies the block index.
nConvIdxSpecifies the convolution index.
nNumOutputSpecifies the number of outputs.
nConvCountSpecifies the number of convolution layers to add.
bNoPoolWhen adding the last layer, specifies whether or not to add a pooling (false) or convolution (true) layer. When this parameter is null, the adding of the last layer is skipped.
bDilatePoolOptionally, specifies whether or not to dilate the last pooling layer (default = false).
nKernelSizeOptionally, specifies the kernel size (default = 3).
nPadOptionally, specifies the pad (default = 1).
nStrideOptionally, specifies the stride (default = 1).
nDilationOptionally, specifies the dilation (default = 1).
Returns

Definition at line 728 of file ModelBuilder.cs.

◆ addVGGfc()

LayerParameter MyCaffe.model.ModelBuilder.addVGGfc ( LayerParameter  lastLayer,
int  nBlockIdx,
int  nConvIdx,
int  nNumOutput,
int  nDilation,
bool  bDilated,
bool  bNoPool,
bool  bFullConv,
bool  bReduced,
bool  bDropout 
)
protected

Adds the final layers to the network.

Parameters
lastLayerSpecifies the previous layer to connect the last layers to.
nBlockIdxSpecifies the block index.
nConvIdxSpecifies the convolution index.
nNumOutputSpecifies the number of outputs for the convolution layers.
nDilationSpecifies the dilation to use for the last fully connected convolution layers (used when bFullConv = true).
bDilatedSpecifies whether or not dialation is used.
bNoPoolSpecifies whether or not pooling is used.
bFullConvSpecifies whether or not full convolution layers are used instead of inner product layers.
bReducedSpecifies whether or not the final layers are used to reduce the data.
bDropoutSpecifies whether or not dropout layers are connected.
Returns
The last layer is returned.

Definition at line 777 of file ModelBuilder.cs.

◆ addVGGNetBody()

LayerParameter MyCaffe.model.ModelBuilder.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 
)
protected

Adds the full VGG body to the network, connecting it to the 'lastLayer'.

Parameters
lastLayerSpecifies the layer to connect the VGG net to.
bNeedFcOptionally, specifies whether or not to add the fully connected end layers (default = true).
bFullConvOptionally, specifies whether or not full convolution layers are used instead of inner product layers (default = true).
bReducedOptionally, specifies whether or not the final layers are used to reduce the data (default = true).
bDilatedOptionally, specifies whether or not dialation is used (default = true).
bNoPoolOptionally, specifies whether or not pooling is used (default = false, use pooling).
bDropoutOptionally, specifies whether or not dropout layers are connected (default = false).
rgstrFreezeLayersOptionally, specifies a set of layers who's training is to be frozen (default = null to ignore).
bDilatePool4Optionally, specifies whether or not to dilate pool #4 (default = false).
Returns
The last layer is returned.

Definition at line 915 of file ModelBuilder.cs.

◆ connectAndAddLayer() [1/3]

LayerParameter MyCaffe.model.ModelBuilder.connectAndAddLayer ( LayerParameter  fromLayer,
LayerParameter  toLayer,
bool  bInPlace = false,
bool  bAdd = true,
int  nTopIdx = 0 
)
protected

Connect the from layer to the 'to' layer.

Parameters
fromLayerSpecifies the layer who's bottom is connected to the toLayer's top.
toLayerSpecifies the layer who's top is connected to the from layer's bottom.
bInPlaceOptionally, specifies whether or not to connect both the top and bottom of the toLayer to the top of the from layer.
bAddOptionally, specifies whether or not to add the layer to the network (default = true).
nTopIdxOptionally, specifies the top index of the item to connect.
Returns
The toLayer is returned as the next layer.

Definition at line 624 of file ModelBuilder.cs.

◆ connectAndAddLayer() [2/3]

LayerParameter MyCaffe.model.ModelBuilder.connectAndAddLayer ( List< LayerParameter rgFromLayer,
LayerParameter  toLayer,
bool  bAdd = true 
)
protected

Connect the from layer to the 'to' layer.

Parameters
rgFromLayerSpecifies a list of layers who's bottoms are connected to the toLayer's top.
toLayerSpecifies the layer who's top is connected to the from layer's bottom.
bAddOptionally, specifies whether or not to add the layer to the network (default = true).
Returns
The toLayer is returned as the next layer.

Definition at line 648 of file ModelBuilder.cs.

◆ connectAndAddLayer() [3/3]

LayerParameter MyCaffe.model.ModelBuilder.connectAndAddLayer ( string  fromLayer,
LayerParameter  toLayer,
string  fromLayer2 = null 
)
protected

Connect the from layer to the 'to' layer.

Parameters
fromLayerSpecifies the layer bottom to connect to the toLayer's top.
toLayerSpecifies the layer who's top is connected to the from layer's bottom.
fromLayer2Optionally, specifies a second input layer.
Returns
The toLayer is returned as the next layer.

Definition at line 602 of file ModelBuilder.cs.

◆ createConvolution()

LayerParameter MyCaffe.model.ModelBuilder.createConvolution ( string  strName,
int  nNumOutput,
int  nKernelSize,
int  nPad = 0,
int  nStride = 1,
int  nDilation = 1 
)
protected

Create a new convolution layer parameter.

Parameters
strNameSpecifies the layer name.
nNumOutputSpecifies the number of output.
nKernelSizeSpecifies the kernel size.
nPadOptionally, specifies the pad (default = 0).
nStrideOptionally, specifies the stride (default = 1).
nDilationOptionally, specifies the dilation (default = 1).
Returns
The convolution layer parameter is returned.

Definition at line 673 of file ModelBuilder.cs.

◆ CreateDeployModel()

abstract NetParameter MyCaffe.model.ModelBuilder.CreateDeployModel ( )
pure virtual

◆ CreateModel()

abstract NetParameter MyCaffe.model.ModelBuilder.CreateModel ( bool  bDeploy = false)
pure virtual

Create the training/testing/deploy model to use.

Implemented in MyCaffe.model.ResNetModelBuilder, MyCaffe.model.ResNetOctConvModelBuilder, and MyCaffe.model.SsdPascalModelBuilder.

◆ createMultiBoxHead()

List< LayerParameter > MyCaffe.model.ModelBuilder.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 = "" 
)
protected

Create the multi-box head layers.

Parameters
dataSpecifies the data layer.
nNumClassesSpecifies the number of classes.
rgInfoSpecifies the info associated with the layers to connect to.
rgPriorVarianceSpecifies the prior variance.
bUseObjectnessOptionally, specifies whether or not to use objectness (default = false).
bUseBatchNormOptionally, specifies whether or not to use batch-norm layers (default = true).
dfLrMultOptionally, specifies the learning multiplier (default = 1.0).
useScaleOptionally, specifies whether or not to use scale layers (default = true).
nImageHtOptionally, specifies the image height (default = 0, ignore).
nImageWdOptionally, specifies the image width (default = 0, ignore).
bShareLocationOptionally, specifies whether or not to share the location (default = true).
bFlipOptionally, specifies whether or not to flip (default = true).
bClipOptionally, specifies whether or not to clip (default = true).
dfOffsetOptionally, specifies the offset (default = 0.5).
nKernelSizeOptionally, specifies the kernel size (default = 1).
nPadOptionally, specifies the pad (default = 0).
strConfPostfixOptionally, specifies the confidence postfix (default = "").
strLocPostfixOptionally, specifies the location postifix (default = "").
Returns

Definition at line 244 of file ModelBuilder.cs.

◆ createNet()

NetParameter MyCaffe.model.ModelBuilder.createNet ( string  strName)
protected

Create the base network parameter for the model and set its name to the 'm_strModel' name.

Parameters
strNameSpecifies the model name.
Returns
The NetParameter created is returned.

Definition at line 129 of file ModelBuilder.cs.

◆ createPooling()

LayerParameter MyCaffe.model.ModelBuilder.createPooling ( string  strName,
PoolingParameter.PoolingMethod  method,
int  nKernelSize,
int  nPad = 0,
int  nStride = 1 
)
protected

Create a new pooling layer parameter.

Parameters
strNameSpecifies the layer name.
methodSpecifies the pooling method.
nKernelSizeSpecifies the kernel size.
nPadOptionally, specifies the pad (default = 0).
nStrideOptionally, specifies the stride (default = 1).
Returns
The pooling layer parameter is returned.

Definition at line 700 of file ModelBuilder.cs.

◆ CreateSolver()

abstract SolverParameter MyCaffe.model.ModelBuilder.CreateSolver ( )
pure virtual

Create the base solver to use.

Returns
The solver parameter created is returned.

Implemented in MyCaffe.model.ResNetModelBuilder, MyCaffe.model.ResNetOctConvModelBuilder, and MyCaffe.model.SsdPascalModelBuilder.

◆ findLayer()

LayerParameter MyCaffe.model.ModelBuilder.findLayer ( string  strName)
protected

Find a layer with a given name.

Parameters
strNameSpecifies the name of the layer to find.
Returns
The layer parameter of the layer with the specified name is returned.

Definition at line 113 of file ModelBuilder.cs.

◆ getFileName()

string MyCaffe.model.ModelBuilder.getFileName ( string  strFile,
string  strSubDir 
)
protected

Returns the full path of the filename using the base directory original set when creating the ModelBuilder.

Parameters
strFileSpecifies the partial path of the file.
strSubDirSpecifies the sub-directory off the path (or null for none).
Returns
The full path of the file is returned.

Definition at line 89 of file ModelBuilder.cs.

Member Data Documentation

◆ m_net

NetParameter MyCaffe.model.ModelBuilder.m_net = new NetParameter()
protected

Specifies the base net to be altered.

Definition at line 27 of file ModelBuilder.cs.

◆ m_solver

SolverParameter MyCaffe.model.ModelBuilder.m_solver = new SolverParameter()
protected

Specifies the base solver to use.

Definition at line 31 of file ModelBuilder.cs.

◆ m_strBaseDir

string MyCaffe.model.ModelBuilder.m_strBaseDir
protected

Specifies the base directory that contains the data and models.

Definition at line 23 of file ModelBuilder.cs.

Property Documentation

◆ Net

NetParameter MyCaffe.model.ModelBuilder.Net
get

Returns the base net altered by the model builder.

Definition at line 1105 of file ModelBuilder.cs.

◆ Solver

SolverParameter MyCaffe.model.ModelBuilder.Solver
get

Returns the base solver.

Definition at line 1113 of file ModelBuilder.cs.


The documentation for this class was generated from the following file: