MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
SigmoidParameter.cs
1using System;
2using System.Collections.Generic;
4using System.Linq;
5using System.Text;
6using MyCaffe.basecode;
7
8namespace MyCaffe.param
9{
18 [Serializable]
19 [TypeConverter(typeof(ExpandableObjectConverter))]
21 {
24 : base()
25 {
26 }
27
32 public string useCaffeReason()
33 {
34 if (engine == Engine.CAFFE)
35 return "The engine setting is set on CAFFE.";
36
37 return "";
38 }
39
44 public bool useCudnn()
45 {
46 if (engine == EngineParameter.Engine.CAFFE)
47 return false;
48
49 return true;
50 }
51
52
54 public override object Load(System.IO.BinaryReader br, bool bNewInstance = true)
55 {
56 RawProto proto = RawProto.Parse(br.ReadString());
57 SigmoidParameter p = FromProto(proto);
58
59 if (!bNewInstance)
60 Copy(p);
61
62 return p;
63 }
64
66 public override LayerParameterBase Clone()
67 {
69 p.Copy(this);
70 return p;
71 }
72
78 public static new SigmoidParameter FromProto(RawProto rp)
79 {
81
83
84 return p;
85 }
86 }
87}
The RawProto class is used to parse and output Google prototxt file data.
Definition: RawProto.cs:17
static RawProto Parse(string str)
Parses a prototxt and places it in a new RawProto.
Definition: RawProto.cs:306
Specifies whether to use the NVIDIA cuDnn version or Caffe version of a given forward/backward operat...
Engine engine
Specifies the Engine in use.
static EngineParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
Engine
Defines the type of engine to use.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
The LayerParameterBase is the base class for all other layer specific parameters.
Specifies the parameters for the SigmoidLayer.
bool useCudnn()
Queries whether or not to use NVIDIA's cuDnn.
static new SigmoidParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
string useCaffeReason()
Returns the reason that Caffe version was used instead of NVIDIA's cuDnn.
SigmoidParameter()
Constructor for the parameter.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
Definition: Annotation.cs:12
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