MyCaffe  1.11.7.7
Deep learning software for Windows C# programmers.
MyCaffe.param.NetParameter Class Reference

Specifies the parameters use to create a Net More...

Inheritance diagram for MyCaffe.param.NetParameter:
MyCaffe.basecode.BaseParameter

Public Member Functions

 NetParameter ()
 Constructor for the parameter. More...
 
void Save (BinaryWriter bw)
 Save the parameter to a binary writer. More...
 
override RawProto ToProto (string strName)
 Constructor for the parameter. More...
 
RawProto ToProto (string strName, bool bIncludeState)
 Save the parameter settings to a RawProto. More...
 
NetParameter Clone (bool bCloneLayers=true, int? nSolverCount=null, int? nSolverRank=null)
 Creates a new copy of this instance of the parameter. More...
 
string DebugString ()
 Returns a debug string for the network. More...
 
LayerParameter FindLayer (LayerParameter.LayerType type, Phase phase=Phase.NONE)
 Locates a layer based on a layer type and phase. More...
 
int FindLayerIndex (string strName)
 Locates the index of a layer based on a given layer name. More...
 
void SetPoolingReshapeAlgorithm (PoolingParameter.PoolingReshapeAlgorithm alg)
 Sets all pooling layers to use the specified reshape algorithm. 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 NetParameter Load (BinaryReader br)
 Load a new instance of the parameter from a binary reader. More...
 
static NetParameter FromProto (RawProto rp)
 Parse a RawProto into a new instance of the parameter. More...
 
static Dictionary< string, BlobShapeInputFromProto (RawProto rp)
 Collect the inputs from the 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

int ProjectID [getset]
 Specifies the ID of the project that created this net param (if any). More...
 
string name [getset]
 The name of the network. More...
 
List< string > input [getset]
 The input blobs to the network. More...
 
List< BlobShapeinput_shape [getset]
 The shape of the input blobs. More...
 
List< int > input_dim [getset]
 DEPRECIATED - 4D input dimensions - use 'input_shape' instead. If specified, for each input blob there should be four values specifying the num, channels, height and width of the input blob. Thus, there should be a total of (4 * input) numbers. More...
 
bool force_backward [getset]
 Whether the network will force every layer to carry out backward operation. If set False, then whether to carry out backward is determined automatically according to the net structure and learning rates. More...
 
NetState state [getset]
 The current 'state' of the network, including the phase, level and stage. Some layers may be included/excluded depending on this state and the states specified in the layers' include and exclude fields. More...
 
bool debug_info [getset]
 Print debugging information about results while running Net::Forward, Net::Backward and Net::Update. More...
 
List< LayerParameterlayer [getset]
 The layers that make up the net. Each of their configurations, including connectivity and behavior, is specified as a LayerParameter. More...
 
int solver_count [getset]
 Specifies the number of solvers used in a multi-gpu training session. More...
 
int solver_rank [getset]
 Specifies the rank of the solver using this network. More...
 

Detailed Description

Specifies the parameters use to create a Net

Definition at line 15 of file NetParameter.cs.

Constructor & Destructor Documentation

◆ NetParameter()

MyCaffe.param.NetParameter.NetParameter ( )

Constructor for the parameter.

Definition at line 30 of file NetParameter.cs.

Member Function Documentation

◆ Clone()

NetParameter MyCaffe.param.NetParameter.Clone ( bool  bCloneLayers = true,
int?  nSolverCount = null,
int?  nSolverRank = null 
)

Creates a new copy of this instance of the parameter.

Parameters
bCloneLayersWhen true, each layer is cloned as well.
nSolverCountOptionally, specifies a solver count for the clone.
nSolverRankOptionally, specifies a solver rank for the clone.
Returns
A new instance of this parameter is returned.

Definition at line 312 of file NetParameter.cs.

◆ DebugString()

string MyCaffe.param.NetParameter.DebugString ( )

Returns a debug string for the network.

Returns
The debug string is returned.

Definition at line 344 of file NetParameter.cs.

◆ FindLayer()

LayerParameter MyCaffe.param.NetParameter.FindLayer ( LayerParameter.LayerType  type,
Phase  phase = Phase.NONE 
)

Locates a layer based on a layer type and phase.

Parameters
typeSpecifies the LayerParameter.LayerType to look for.
phaseOptionally, specifies a phase to look for.
Returns

Definition at line 366 of file NetParameter.cs.

◆ FindLayerIndex()

int MyCaffe.param.NetParameter.FindLayerIndex ( string  strName)

Locates the index of a layer based on a given layer name.

Parameters
strNameSpecifies the layer name to look for.
Returns
The index of the layer is returned.

Definition at line 385 of file NetParameter.cs.

◆ FromProto()

static NetParameter MyCaffe.param.NetParameter.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 240 of file NetParameter.cs.

◆ InputFromProto()

static Dictionary< string, BlobShape > MyCaffe.param.NetParameter.InputFromProto ( RawProto  rp)
static

Collect the inputs from the RawProto.

Parameters
rpSpecifies the raw proto.
Returns
A dictionary of the inputs and their shapes is returned.

Definition at line 282 of file NetParameter.cs.

◆ Load()

static NetParameter MyCaffe.param.NetParameter.Load ( BinaryReader  br)
static

Load a new instance of the parameter from a binary reader.

Parameters
brSpecifies the binary reader.
Returns
The new instance is returned.

Definition at line 56 of file NetParameter.cs.

◆ Save()

void MyCaffe.param.NetParameter.Save ( BinaryWriter  bw)

Save the parameter to a binary writer.

Parameters
bwSpecifies the binary writer to use.

Definition at line 39 of file NetParameter.cs.

◆ SetPoolingReshapeAlgorithm()

void MyCaffe.param.NetParameter.SetPoolingReshapeAlgorithm ( PoolingParameter.PoolingReshapeAlgorithm  alg)

Sets all pooling layers to use the specified reshape algorithm.

Parameters
algSpecifies the reshape algorithm to use (DEFAULT, CAFFE or ONNX).

Definition at line 400 of file NetParameter.cs.

◆ ToProto() [1/2]

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

Constructor for the parameter.

Implements MyCaffe.basecode.BaseParameter.

Definition at line 193 of file NetParameter.cs.

◆ ToProto() [2/2]

RawProto MyCaffe.param.NetParameter.ToProto ( string  strName,
bool  bIncludeState 
)

Save the parameter settings to a RawProto.

Parameters
strNameSpecifies the name, typically 'root'.
bIncludeStateSpecifies whether or not to also include the state when saving.
Returns
The RawProto representing the settings is returned.

Definition at line 204 of file NetParameter.cs.

Property Documentation

◆ debug_info

bool MyCaffe.param.NetParameter.debug_info
getset

Print debugging information about results while running Net::Forward, Net::Backward and Net::Update.

Definition at line 155 of file NetParameter.cs.

◆ force_backward

bool MyCaffe.param.NetParameter.force_backward
getset

Whether the network will force every layer to carry out backward operation. If set False, then whether to carry out backward is determined automatically according to the net structure and learning rates.

Definition at line 132 of file NetParameter.cs.

◆ input

List<string> MyCaffe.param.NetParameter.input
getset

The input blobs to the network.

Definition at line 97 of file NetParameter.cs.

◆ input_dim

List<int> MyCaffe.param.NetParameter.input_dim
getset

DEPRECIATED - 4D input dimensions - use 'input_shape' instead. If specified, for each input blob there should be four values specifying the num, channels, height and width of the input blob. Thus, there should be a total of (4 * input) numbers.

Definition at line 120 of file NetParameter.cs.

◆ input_shape

List<BlobShape> MyCaffe.param.NetParameter.input_shape
getset

The shape of the input blobs.

Definition at line 107 of file NetParameter.cs.

◆ layer

List<LayerParameter> MyCaffe.param.NetParameter.layer
getset

The layers that make up the net. Each of their configurations, including connectivity and behavior, is specified as a LayerParameter.

Definition at line 166 of file NetParameter.cs.

◆ name

string MyCaffe.param.NetParameter.name
getset

The name of the network.

Definition at line 87 of file NetParameter.cs.

◆ ProjectID

int MyCaffe.param.NetParameter.ProjectID
getset

Specifies the ID of the project that created this net param (if any).

Definition at line 77 of file NetParameter.cs.

◆ solver_count

int MyCaffe.param.NetParameter.solver_count
getset

Specifies the number of solvers used in a multi-gpu training session.

Definition at line 176 of file NetParameter.cs.

◆ solver_rank

int MyCaffe.param.NetParameter.solver_rank
getset

Specifies the rank of the solver using this network.

Definition at line 186 of file NetParameter.cs.

◆ state

NetState MyCaffe.param.NetParameter.state
getset

The current 'state' of the network, including the phase, level and stage. Some layers may be included/excluded depending on this state and the states specified in the layers' include and exclude fields.

Definition at line 144 of file NetParameter.cs.


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