MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
StateDescriptor.cs
1using System;
2using System.Collections.Generic;
4using System.Linq;
5using System.Text;
6using System.Threading.Tasks;
7
9{
13 [Serializable]
15 {
16 byte[] m_rgWeights;
17 byte[] m_rgState;
18 double m_dfAccuracy;
19 double m_dfError;
20 int m_nIterations;
21
22
29 public StateDescriptor(int nId, string strName, string strOwner)
30 : base(nId, strName, strOwner)
31 {
32 m_rgWeights = null;
33 m_rgState = null;
34 m_dfAccuracy = -1;
35 m_dfError = -1;
36 m_nIterations = 0;
37 }
38
50 public StateDescriptor(int nId, string strName, byte[] rgWeights, byte[] rgState, double dfAccuracy, double dfError, int nIterations, string strOwner)
51 : base(nId, strName, strOwner)
52 {
53 m_rgWeights = rgWeights;
54 m_rgState = rgState;
55 m_dfAccuracy = dfAccuracy;
56 m_dfError = dfError;
57 m_nIterations = nIterations;
58 }
59
63 public bool HasResults
64 {
65 get { return (m_rgWeights == null) ? false : true; }
66 }
67
71 [Browsable(false)]
72 public byte[] Weights
73 {
74 get { return m_rgWeights; }
75 set { m_rgWeights = value; }
76 }
77
81 [Browsable(false)]
82 public byte[] State
83 {
84 get { return m_rgState; }
85 set { m_rgState = value; }
86 }
87
91 [ReadOnly(true)]
92 public double Accuracy
93 {
94 get { return m_dfAccuracy; }
95 set { m_dfAccuracy = value; }
96 }
97
101 [ReadOnly(true)]
102 public double Error
103 {
104 get { return m_dfError; }
105 set { m_dfError = value; }
106 }
107
111 [ReadOnly(true)]
112 public int Iterations
113 {
114 get { return m_nIterations; }
115 set { m_nIterations = value; }
116 }
117
122 public override string ToString()
123 {
124 return m_nIterations.ToString() + " -> error = " + m_dfError.ToString() + " accuracy = " + m_dfAccuracy.ToString();
125 }
126 }
127}
The BaseDescriptor is the base class for all other descriptors, where descriptors are used to describ...
The StateDescriptor class contains the information related to the state of a project incuding the sol...
StateDescriptor(int nId, string strName, string strOwner)
The StateDescriptor constructor.
double Accuracy
Returns the accuracy observed while testing.
StateDescriptor(int nId, string strName, byte[] rgWeights, byte[] rgState, double dfAccuracy, double dfError, int nIterations, string strOwner)
The StateDescriptor constructor.
byte[] State
Get/set the state of a Solver in training.
bool? HasResults
Returns whether or not the state has results (e.g. it has been trained at least to some degree).
byte[] Weights
Get/set the weights of a trained Net.
double Error
Specifies the error observed whiel training.
int Iterations
Specifies the number of iterations run.
override string ToString()
Creates the string representation of the descriptor.
The descriptors namespace contains all descriptor used to describe various items stored within the da...