MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.param.ConvolutionParameter Class Reference

Specifies the parameters for the ConvolutionLayer. The default weight filler is set to the XavierFiller, and the default bias filler is set to ConstantFiller with a value of 0.1. More...

Inheritance diagram for MyCaffe.param.ConvolutionParameter:
MyCaffe.param.KernelParameter MyCaffe.param.EngineParameter MyCaffe.param.LayerParameterBase MyCaffe.basecode.BaseParameter MyCaffe.basecode.IBinaryPersist

Public Member Functions

 ConvolutionParameter ()
 Constructor for the parameter. More...
 
string useCaffeReason (int nNumSpatialAxes=2)
 Returns the reason that Caffe version was used instead of NVIDIA's cuDnn. More...
 
bool useCudnn (int nNumSpatialAxes=2)
 Queries whether or not to use NVIDIA's cuDnn. 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.KernelParameter
 KernelParameter ()
 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.EngineParameter
 EngineParameter ()
 Constructor for the parameter. More...
 
override object Load (System.IO.BinaryReader br, bool bNewInstance=true)
 Load the parameter from a binary reader. 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 new ConvolutionParameter FromProto (RawProto rp)
 Parse a RawProto into a new instance of the parameter. More...
 
- Static Public Member Functions inherited from MyCaffe.param.KernelParameter
static new KernelParameter FromProto (RawProto rp)
 Parse a RawProto into a new instance of the parameter. More...
 
- Static Public Member Functions inherited from MyCaffe.param.EngineParameter
static EngineParameter FromProto (RawProto rp)
 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

bool cudnn_workspace_allow_on_groups [getset]
 When true, allows workspace usage on groups > 1 (default = false). More...
 
int cudnn_workspace_limit [getset]
 Specifies the workspace limit used by cuDnn. A value of 0 directs cuDNN to use the fastest algorithm possible. More...
 
bool cudnn_enable_tensor_cores [getset]
 Specifies to enable the CUDA tensor cores when performing the convolution which is faster but not supported by all GPU's. More...
 
uint num_output [getset]
 The number of outputs for the layer. More...
 
bool bias_term [getset]
 Whether to have bias terms or not. More...
 
uint group [getset]
 The group size for group convolution. More...
 
FillerParameter weight_filler [getset]
 The filler for the weight. The default is set to use the 'xavier' filler. More...
 
FillerParameter bias_filler [getset]
 The filler for the bias. The default is set to use the 'constant = 0.1' filler. More...
 
int axis [getset]
 The axis to interpret as 'channels' when performing convolution. Preceding dimensions are treated as independent inputs; succeeding dimensions are treated as 'spatial'. With $ (N \times C \times H \times W) $ inputs, and axis == 1 (the default), we perform N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for groups g>1) filters across the spatial axes (H, W) of the input. With $ (N \times C \times D \times H \times W) $ inputs, and axis == 1, we perform N independent 3D convolutions, sliding (C/g)-channels filters across teh spatial axes $ (D \times H \times W) $ of the input. More...
 
bool force_nd_im2col [getset]
 Whether to force use of the general ND convolution, even if a specific implementation for blobs of the appropriate number of spatial dimensions is available. (Currently, there is only a 2D-specific convolution implementation; for input blobs with num_axes != 2, this option is ignored and the ND implementation will be used.) More...
 
- Properties inherited from MyCaffe.param.KernelParameter
List< uint > pad [getset]
 Pad is given as a single value for equal dimensions in all spatial dimensions, or once per spatial dimension. More...
 
List< uint > stride [getset]
 Stride is given as a single value for equal dimensions in all spatial dimensions, or once per spatial dimension. More...
 
List< uint > kernel_size [getset]
 Kernel size is given as a single value for equal dimensions in all spatial dimensions, or once per spatial dimension. More...
 
List< uint > dilation [getset]
 Factor used to dilate the kernel, (implicitly) zero-filling the resulting holes. (Kernel dilation is sometimes referred to by its use in the algorithm 'a trous from Holschneider et al. 1987.) More...
 
uint? pad_h [getset]
 The padding height (2D only) More...
 
uint? pad_w [getset]
 The padding width (2D only) More...
 
uint? stride_h [getset]
 The stride height (2D only) More...
 
uint? stride_w [getset]
 The stride width (2D only) More...
 
uint? kernel_h [getset]
 The kernel height (2D only) More...
 
uint? kernel_w [getset]
 The kernel width (2D only) More...
 
- Properties inherited from MyCaffe.param.EngineParameter
Engine engine [getset]
 Specifies the Engine in use. More...
 

Additional Inherited Members

- Public Types inherited from MyCaffe.param.EngineParameter
enum  Engine { DEFAULT = 0 , CAFFE = 1 , CUDNN = 2 }
 Defines the type of engine to use. More...
 
- Public Types inherited from MyCaffe.param.LayerParameterBase
enum  LABEL_TYPE { NONE , SINGLE , MULTIPLE , ONLY_ONE }
 Defines the label type. More...
 

Detailed Description

Specifies the parameters for the ConvolutionLayer. The default weight filler is set to the XavierFiller, and the default bias filler is set to ConstantFiller with a value of 0.1.

See also
Gradient-Based Learning Applied to Document Recognition by Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner, 1998.
A guide to convolution arithmetic for deep learning by Vincent Dumoulin, and Francesco Visin, 2016.
Joint Semantic and Motion Segmentation for dynamic scenes using Deep Convolutional Networks by Nazrul Haque, N. Dinesh Reddy, and K. Madhava Krishna, 2017.
A New Convolutional Network-in-Network Structure and Its Applications in Skin Detection, Semantic Segmentation, and Artifact Reduction by Yoonsik Kim, Insung Hwang, and Nam Ik Cho, 2017.
Fully Convolutional Networks for Semantic Segmentation by Jonathan Long, Evan Shelhamer, and Trevor Darrell, 2014.
Multi-Scale Context Aggregation by Dilated Convolutions by Fisher Yu, and Vladlen Koltun, 2015.

Definition at line 23 of file ConvolutionParameter.cs.

Constructor & Destructor Documentation

◆ ConvolutionParameter()

MyCaffe.param.ConvolutionParameter.ConvolutionParameter ( )

Constructor for the parameter.

Definition at line 37 of file ConvolutionParameter.cs.

Member Function Documentation

◆ Clone()

override LayerParameterBase MyCaffe.param.ConvolutionParameter.Clone ( )
virtual

Creates a new copy of this instance of the parameter.

Returns
A new instance of this parameter is returned.

Implements MyCaffe.param.LayerParameterBase.

Definition at line 234 of file ConvolutionParameter.cs.

◆ Copy()

override void MyCaffe.param.ConvolutionParameter.Copy ( LayerParameterBase  src)
virtual

Copy on parameter to another.

Parameters
srcSpecifies the parameter to copy.

Implements MyCaffe.param.LayerParameterBase.

Definition at line 208 of file ConvolutionParameter.cs.

◆ FromProto()

static new ConvolutionParameter MyCaffe.param.ConvolutionParameter.FromProto ( RawProto  rp)
static

Parse a RawProto into a new instance of the parameter.

Parameters
rpSpecifies the RawProto to parse.
Returns
A new instance of the parameter is returned.

Definition at line 281 of file ConvolutionParameter.cs.

◆ Load()

override object MyCaffe.param.ConvolutionParameter.Load ( System.IO.BinaryReader  br,
bool  bNewInstance = true 
)

Load the parameter from a binary reader.

Parameters
brSpecifies the binary reader.
bNewInstanceWhen true a new instance is created (the default), otherwise the existing instance is loaded from the binary reader.
Returns
Returns an instance of the parameter.

Definition at line 196 of file ConvolutionParameter.cs.

◆ ToProto()

override RawProto MyCaffe.param.ConvolutionParameter.ToProto ( string  strName)
virtual

Convert the parameter into a RawProto.

Parameters
strNameSpecifies the base name for the raw proto.
Returns
The RawProto is returned.

Implements MyCaffe.basecode.BaseParameter.

Definition at line 242 of file ConvolutionParameter.cs.

◆ useCaffeReason()

string MyCaffe.param.ConvolutionParameter.useCaffeReason ( int  nNumSpatialAxes = 2)

Returns the reason that Caffe version was used instead of NVIDIA's cuDnn.

Returns

Definition at line 45 of file ConvolutionParameter.cs.

◆ useCudnn()

bool MyCaffe.param.ConvolutionParameter.useCudnn ( int  nNumSpatialAxes = 2)

Queries whether or not to use NVIDIA's cuDnn.

Parameters
nNumSpatialAxesSpecifies the number of spatial axes used. For example typically four spatial axes are used: N, C, H, W.
Returns
Returns true when cuDnn is to be used, false otherwise.

Definition at line 61 of file ConvolutionParameter.cs.

Property Documentation

◆ axis

int MyCaffe.param.ConvolutionParameter.axis
getset

The axis to interpret as 'channels' when performing convolution. Preceding dimensions are treated as independent inputs; succeeding dimensions are treated as 'spatial'. With $ (N \times C \times H \times W) $ inputs, and axis == 1 (the default), we perform N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for groups g>1) filters across the spatial axes (H, W) of the input. With $ (N \times C \times D \times H \times W) $ inputs, and axis == 1, we perform N independent 3D convolutions, sliding (C/g)-channels filters across teh spatial axes $ (D \times H \times W) $ of the input.

Definition at line 175 of file ConvolutionParameter.cs.

◆ bias_filler

FillerParameter MyCaffe.param.ConvolutionParameter.bias_filler
getset

The filler for the bias. The default is set to use the 'constant = 0.1' filler.

Definition at line 157 of file ConvolutionParameter.cs.

◆ bias_term

bool MyCaffe.param.ConvolutionParameter.bias_term
getset

Whether to have bias terms or not.

Definition at line 125 of file ConvolutionParameter.cs.

◆ cudnn_enable_tensor_cores

bool MyCaffe.param.ConvolutionParameter.cudnn_enable_tensor_cores
getset

Specifies to enable the CUDA tensor cores when performing the convolution which is faster but not supported by all GPU's.

When run on GPU's that do not support Tensor cores, the default math (non-tensor core) is used.

Definition at line 105 of file ConvolutionParameter.cs.

◆ cudnn_workspace_allow_on_groups

bool MyCaffe.param.ConvolutionParameter.cudnn_workspace_allow_on_groups
getset

When true, allows workspace usage on groups > 1 (default = false).

Currently using workspaces on groups > 1 can cause cuDnn memory errors and for this reason the default to this setting is false.

Definition at line 81 of file ConvolutionParameter.cs.

◆ cudnn_workspace_limit

int MyCaffe.param.ConvolutionParameter.cudnn_workspace_limit
getset

Specifies the workspace limit used by cuDnn. A value of 0 directs cuDNN to use the fastest algorithm possible.

Definition at line 92 of file ConvolutionParameter.cs.

◆ force_nd_im2col

bool MyCaffe.param.ConvolutionParameter.force_nd_im2col
getset

Whether to force use of the general ND convolution, even if a specific implementation for blobs of the appropriate number of spatial dimensions is available. (Currently, there is only a 2D-specific convolution implementation; for input blobs with num_axes != 2, this option is ignored and the ND implementation will be used.)

Definition at line 189 of file ConvolutionParameter.cs.

◆ group

uint MyCaffe.param.ConvolutionParameter.group
getset

The group size for group convolution.

Definition at line 135 of file ConvolutionParameter.cs.

◆ num_output

uint MyCaffe.param.ConvolutionParameter.num_output
getset

The number of outputs for the layer.

Definition at line 115 of file ConvolutionParameter.cs.

◆ weight_filler

FillerParameter MyCaffe.param.ConvolutionParameter.weight_filler
getset

The filler for the weight. The default is set to use the 'xavier' filler.

Definition at line 146 of file ConvolutionParameter.cs.


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