MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
LayerParameterBase.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.IO;
6using MyCaffe.basecode;
7using MyCaffe.common;
8
12namespace MyCaffe.param
13{
18 {
22 public enum LABEL_TYPE
23 {
27 NONE,
31 SINGLE,
36 MULTIPLE,
40 ONLY_ONE
41 }
42
45 {
46 }
47
53 public virtual string PrepareRunModelInputs()
54 {
55 return null;
56 }
57
62 public virtual void PrepareRunModel(LayerParameter p)
63 {
64 }
65
70 public abstract LayerParameterBase Clone();
71
76 public abstract void Copy(LayerParameterBase src);
77
82 public void Save(BinaryWriter bw)
83 {
84 RawProto proto = ToProto("layer_param");
85 bw.Write(proto.ToString());
86 }
87
94 public abstract object Load(BinaryReader br, bool bNewInstance = true);
95 }
96}
The BaseParameter class is the base class for all other parameter classes.
abstract RawProto ToProto(string strName)
Convert the parameter into a RawProto.
The RawProto class is used to parse and output Google prototxt file data.
Definition: RawProto.cs:17
override string ToString()
Returns the RawProto as its full prototxt string.
Definition: RawProto.cs:681
The LayerParameterBase is the base class for all other layer specific parameters.
virtual string PrepareRunModelInputs()
This method gives derivative classes a chance specify model inputs required by the run model.
LABEL_TYPE
Defines the label type.
LayerParameterBase()
Constructor for the parameter.
abstract LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
void Save(BinaryWriter bw)
Save this parameter to a binary writer.
abstract void Copy(LayerParameterBase src)
Copy on parameter to another.
abstract object Load(BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
virtual void PrepareRunModel(LayerParameter p)
This method gives derivative classes a chance to prepare the layer for a run-model.
Specifies the base parameter for all layers.
The IBinaryPersist interface provides generic save and load functionality.
Definition: Utility.cs:16
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
Definition: Annotation.cs:12
@ NONE
No training category specified.
The MyCaffe.common namespace contains common MyCaffe classes.
Definition: BatchInput.cs:8
The MyCaffe.param namespace contains parameters used to create models.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...
Definition: Annotation.cs:12