MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
Result.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6
7namespace MyCaffe.basecode
8{
9
13 public class Result
14 {
15 int m_nLabel;
16 double m_dfScore;
17 double[] m_rgExtra = null;
18
25 public Result(int nLabel, double dfScore, double[] rgExtra = null)
26 {
27 m_nLabel = nLabel;
28 m_dfScore = dfScore;
29 m_rgExtra = rgExtra;
30 }
31
35 public int Label
36 {
37 get { return m_nLabel; }
38 }
39
44 public void SetScore(double dfScore)
45 {
46 m_dfScore = dfScore;
47 }
48
52 public double Score
53 {
54 get { return m_dfScore; }
55 }
56
60 public double[] Extra
61 {
62 get { return m_rgExtra; }
63 }
64
69 public override string ToString()
70 {
71 return "Label " + m_nLabel.ToString() + " -> " + m_dfScore.ToString("N5");
72 }
73 }
74}
The Result class contains a single result.
Definition: Result.cs:14
int Label
Returns the label.
Definition: Result.cs:36
override string ToString()
Returns a string representation of the result.
Definition: Result.cs:69
void SetScore(double dfScore)
Change the score (typically done when ignoring a label).
Definition: Result.cs:44
Result(int nLabel, double dfScore, double[] rgExtra=null)
The constructor.
Definition: Result.cs:25
double[] Extra
Returns the extra data.
Definition: Result.cs:61
double Score
Returns the score of the run.
Definition: Result.cs:53
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
Definition: Annotation.cs:12