MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
EventArgs.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Security.Cryptography;
5using System.Text;
6
10
11namespace MyCaffe.basecode
12{
16 public class LogProgressArg : EventArgs
17 {
18 string m_strSrc;
19 double m_dfProgress = 0;
20
26 public LogProgressArg(string strSrc, double dfProgress)
27 {
28 m_strSrc = strSrc;
29 m_dfProgress = dfProgress;
30 }
31
35 public string Source
36 {
37 get { return m_strSrc; }
38 }
39
43 public double Progress
44 {
45 get { return m_dfProgress; }
46 }
47 }
48
52 public class LogArg : LogProgressArg
53 {
54 string m_strMsg;
55 object m_tag = null;
56 bool m_bError;
57 bool m_bOverrideEnabled = false;
58 bool m_bConsumed = false;
59 bool m_bDisable = false;
60
70 public LogArg(string strSrc, string strMsg, double dfProgress = 0.0, bool bError = false, bool bOverrideEnabled = false, bool bDisable = false)
71 : base(strSrc, dfProgress)
72 {
73 m_strMsg = strMsg;
74 m_bError = bError;
75 m_bOverrideEnabled = bOverrideEnabled;
76 m_bDisable = bDisable;
77 }
78
82 public bool Consumed
83 {
84 get { return m_bConsumed; }
85 set { m_bConsumed = value; }
86 }
87
91 public bool Disable
92 {
93 get { return m_bDisable; }
94 set { m_bDisable = value; }
95 }
96
100 public string Message
101 {
102 get { return m_strMsg; }
103 }
104
108 public bool Error
109 {
110 get { return m_bError; }
111 }
112
116 public bool OverrideEnabled
117 {
118 get { return m_bOverrideEnabled; }
119 }
120
121#pragma warning disable 1591
122
123 public object Tag
124 {
125 get { return m_tag; }
126 set { m_tag = value; }
127 }
128
129#pragma warning restore 1591
130 }
131
135 public class CalculateImageMeanArgs : EventArgs
136 {
137 SimpleDatum[] m_rgImg;
138 SimpleDatum m_mean;
139 bool m_bCancelled = false;
140
146 {
147 m_rgImg = rgImg;
148 }
149
154 {
155 get { return m_rgImg; }
156 }
157
162 {
163 get { return m_mean; }
164 set { m_mean = value; }
165 }
166
170 public bool Cancelled
171 {
172 get { return m_bCancelled; }
173 set { m_bCancelled = value; }
174 }
175 }
176
180 public class OverrideProjectArgs : EventArgs
181 {
182 RawProto m_proto;
183
189 {
190 m_proto = proto;
191 }
192
197 {
198 get { return m_proto; }
199 set { m_proto = value; }
200 }
201 }
202
206 public class LossArgs : EventArgs
207 {
208 List<int> m_rgShape;
209 float[] m_rgfData;
210
216 public LossArgs(int nCount, List<int> rgShape)
217 {
218 m_rgShape = rgShape;
219 m_rgfData = new float[nCount];
220 }
221
225 public List<int> Shape
226 {
227 get { return m_rgShape; }
228 }
229
233 public float[] Data
234 {
235 get { return m_rgfData; }
236 }
237 }
238}
The CalculateImageMeanArgs is passed as an argument to the MyCaffeImageDatabase::OnCalculateImageMean...
Definition: EventArgs.cs:136
SimpleDatum ImageMean
Get/set the image mean calculated from the Images.
Definition: EventArgs.cs:162
CalculateImageMeanArgs(SimpleDatum[] rgImg)
The CalculateImageMeanArgs constructor.
Definition: EventArgs.cs:145
SimpleDatum[] Images
Specifies the list of images from which the mean should be calculated.
Definition: EventArgs.cs:154
bool Cancelled
Get/set a flag indicating to cancel the operation.
Definition: EventArgs.cs:171
The LogArg is passed as an argument to the Log::OnWriteLine event.
Definition: EventArgs.cs:53
bool Consumed
Specifies whether or not the message has already been consumed.
Definition: EventArgs.cs:83
bool OverrideEnabled
Returns whether or not the override was enabled or not.
Definition: EventArgs.cs:117
bool Error
Returns whether or not this is an error message.
Definition: EventArgs.cs:109
string Message
Returns the message logged.
Definition: EventArgs.cs:101
bool Disable
Specifies whether or not to mark this log entry as disabled so that it is not output.
Definition: EventArgs.cs:92
LogArg(string strSrc, string strMsg, double dfProgress=0.0, bool bError=false, bool bOverrideEnabled=false, bool bDisable=false)
The LogArg constructor.
Definition: EventArgs.cs:70
The LogProgressArg is passed as an argument to the Log::OnProgress event.
Definition: EventArgs.cs:17
LogProgressArg(string strSrc, double dfProgress)
The LogProgressArg constructor.
Definition: EventArgs.cs:26
double Progress
Returns the progress value.
Definition: EventArgs.cs:44
string Source
Returns the Log source name.
Definition: EventArgs.cs:36
The LossArgs contains the loss values for a given batch.
Definition: EventArgs.cs:207
List< int > Shape
Specifies the shape of the data.
Definition: EventArgs.cs:226
float[] Data
Specifies the loss values for a given batch.
Definition: EventArgs.cs:234
LossArgs(int nCount, List< int > rgShape)
The constructor.
Definition: EventArgs.cs:216
The OverrideProjectArgs is passed as an argument to the OnOverrideModel and OnOverrideSolver events f...
Definition: EventArgs.cs:181
RawProto Proto
Get/set the RawProto used.
Definition: EventArgs.cs:197
OverrideProjectArgs(RawProto proto)
The OverrideProjectArgs constructor.
Definition: EventArgs.cs:188
The RawProto class is used to parse and output Google prototxt file data.
Definition: RawProto.cs:17
The SimpleDatum class holds a data input within host memory.
Definition: SimpleDatum.cs:161
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
Definition: Annotation.cs:12