MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
SolverState.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.IO;
6using MyCaffe.common;
8
9namespace MyCaffe.param
10{
14 [Serializable]
15 [TypeConverter(typeof(ExpandableObjectConverter))]
16 public class SolverState
17 {
18 int m_nIter;
19 int m_nCurrentStep = 0;
20 List<BlobProto> m_history = new List<BlobProto>();
21 // L-BFGS state
22 int m_nStart = 0;
23 int m_nEnd = 0;
24 BlobProto m_gradients = null;
25 BlobProto m_direction = null;
26 List<BlobProto> m_rgHistoryS = new List<BlobProto>();
27 List<double> m_rgHistoryRho = new List<double>();
28
32 public SolverState()
33 {
34 }
35
39 public int iter
40 {
41 get { return m_nIter; }
42 set { m_nIter = value; }
43 }
44
48 public int start
49 {
50 get { return m_nStart; }
51 set { m_nStart = value; }
52 }
53
57 public int end
58 {
59 get { return m_nEnd; }
60 set { m_nEnd = value; }
61 }
62
66 public List<BlobProto> history
67 {
68 get { return m_history; }
69 set { m_history = value; }
70 }
71
75 public int current_step
76 {
77 get { return m_nCurrentStep; }
78 set { m_nCurrentStep = value; }
79 }
80
85 {
86 get { return m_gradients; }
87 set { m_gradients = value; }
88 }
89
94 {
95 get { return m_direction; }
96 set { m_direction = value; }
97 }
98
102 public List<BlobProto> s_history
103 {
104 get { return m_rgHistoryS; }
105 set { m_rgHistoryS = value; }
106 }
107
111 public List<double> rho_history
112 {
113 get { return m_rgHistoryRho; }
114 set { m_rgHistoryRho = value; }
115 }
116 }
117}
The BlobProto contains the descripion of a blob.
Definition: BlobProto.cs:15
The SolverState specifies the state of a given solver.
Definition: SolverState.cs:17
int end
Specifies the end used by L-BGFS
Definition: SolverState.cs:58
BlobProto gradients
Gradients used with L-BFGS state.
Definition: SolverState.cs:85
SolverState()
The SolverState constructor.
Definition: SolverState.cs:32
List< double > rho_history
rho history used with L-BFGS state.
Definition: SolverState.cs:112
int iter
The current iteration.
Definition: SolverState.cs:40
List< BlobProto > history
The history for SGD solvers.
Definition: SolverState.cs:67
int start
Specifies the start used by L-BGFS
Definition: SolverState.cs:49
int current_step
The current step for learning rate.
Definition: SolverState.cs:76
List< BlobProto > s_history
S history used with L-BFGS state.
Definition: SolverState.cs:103
BlobProto direction
Direction used with L-BFGS state.
Definition: SolverState.cs:94
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