MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
ProjectDescriptor.cs
1using System;
2using System.Collections.Generic;
4using System.Linq;
5using System.Text;
6using System.Threading.Tasks;
7
9{
13 [Serializable]
15 {
16 DatasetDescriptor m_dataset;
17 DatasetDescriptor m_datasetTarget = null;
18 GroupDescriptor m_group;
19 SettingsCaffe m_settings = new SettingsCaffe();
20 string m_strSolverName;
21 string m_strSolverDescription;
22 string m_strModelName;
23 string m_strModelDescription;
24 bool m_bActive = true;
25 int m_nTotalIterations;
26 string m_strGpuOverride;
29
34 public ProjectDescriptor(string strName)
35 : base(0, strName, null)
36 {
37 }
38
55 public ProjectDescriptor(int nID, string strName, DatasetDescriptor ds, GroupDescriptor grp, string strSolverName, string strSolverDesc, string strModelName, string strModelDesc, string strGpuOverride, int nTotalIterations, bool bActive, SettingsCaffe settings, string strOwner)
56 : base(nID, strName, strOwner)
57 {
58 if (settings != null)
59 m_settings = settings.Clone();
60
61 if (ds != null)
62 m_dataset = new DatasetDescriptor(ds);
63
64 if (grp != null)
65 m_group = new GroupDescriptor(grp);
66 else
67 m_group = new GroupDescriptor(0, null, null);
68
69 m_strSolverName = strSolverName;
70 m_strSolverDescription = strSolverDesc;
71 m_strModelName = strModelName;
72 m_strModelDescription = strModelDesc;
73 m_bActive = bActive;
74 m_nTotalIterations = nTotalIterations;
75 m_strGpuOverride = strGpuOverride;
76 }
77
83 : this(p.ID, p.Name, p.Dataset, p.Group, p.m_strSolverName, p.SolverDescription, p.m_strModelName, p.ModelDescription, p.GpuOverride, p.TotalIterations, p.Active, p.Settings, p.Owner)
84 {
85 m_datasetTarget = p.DatasetTarget;
86 }
87
91 public virtual string GpuOverride
92 {
93 get { return m_strGpuOverride; }
94 set { m_strGpuOverride = value; }
95 }
96
100 [Browsable(false)]
102 {
103 get { return m_dataset; }
104 set { m_dataset = value; }
105 }
106
107
111 [Browsable(false)]
113 {
114 get { return m_datasetTarget; }
115 set { m_datasetTarget = value; }
116 }
117
121 [Description("Specifies the group of the project.")]
123 {
124 get { return m_group; }
125 set { m_group = value; }
126 }
127
131 [Description("Specifies the name of the solver used by the project.")]
132 [ReadOnly(true)]
133 public string SolverName
134 {
135 get { return m_strSolverName; }
136 set { m_strSolverName = value; }
137 }
138
142 [Browsable(false)]
143 [ReadOnly(true)]
144 public string SolverDescription
145 {
146 get { return m_strSolverDescription; }
147 set { m_strSolverDescription = value; }
148 }
149
153 [Description("Specifies the name of the model used by the project.")]
154 [ReadOnly(true)]
155 public string ModelName
156 {
157 get { return m_strModelName; }
158 set { m_strModelName = value; }
159 }
160
164 [Browsable(false)]
165 [ReadOnly(true)]
166 public string ModelDescription
167 {
168 get { return m_strModelDescription; }
169 set { m_strModelDescription = value; }
170 }
171
175 [ReadOnly(true)]
176 [Category("Performance"), Description("Specifies the total number of iterations run on this project.")]
178 {
179 get { return m_nTotalIterations; }
180 set { m_nTotalIterations = value; }
181 }
182
186 [Description("Specifies whether or not the project is active.")]
187 [ReadOnly(true)]
188 public bool Active
189 {
190 get { return m_bActive; }
191 }
192
196 [Description("Specifies parameters associated with the project.")]
198 {
199 get { return m_rgParameters; }
200 }
201
205 [Category("Performance"), Description("Contains a list of analysis items for the project.")]
207 {
208 get { return m_rgAnalysisItems; }
209 }
210
214 [Browsable(false)]
216 {
217 get { return m_settings; }
218 set { m_settings = value; }
219 }
220
225 public override string ToString()
226 {
227 return Name + ": model = " + m_strModelName + " solver = " + m_strSolverName;
228 }
229 }
230}
The SettingsCaffe defines the settings used by the MyCaffe CaffeControl.
SettingsCaffe Clone()
Returns a copy of the SettingsCaffe object.
The BaseDescriptor is the base class for all other descriptors, where descriptors are used to describ...
string Owner
Get/set the owner of the item.
int ID
Get/set the database ID of the item.
string Name
Get/set the name of the item.
The DatasetDescriptor class describes a dataset which contains both a training data source and testin...
The GroupDescriptor class defines a group.
The ParameterDescriptorCollection class contains a list of ParameterDescriptor's.
The ProjectDescriptor class contains all information describing a project, such as its: dataset,...
ValueDescriptorCollection AnalysisItems
Returns the collection of analysis ValueDescriptors of the Project.
ProjectDescriptor(string strName)
The ProjectDescriptor constructor.
string SolverDescription
Get/set the solver description script.
GroupDescriptor Group
Get/set the project group.
string ModelDescription
Get/set the model description script.
DatasetDescriptor DatasetTarget
Get/set the secondary 'target' dataset (if used).
ProjectDescriptor(ProjectDescriptor p)
The ProjectDescriptor constructor.
ProjectDescriptor(int nID, string strName, DatasetDescriptor ds, GroupDescriptor grp, string strSolverName, string strSolverDesc, string strModelName, string strModelDesc, string strGpuOverride, int nTotalIterations, bool bActive, SettingsCaffe settings, string strOwner)
The ProjectDescriptor constructor.
override string ToString()
Creates the string representation of the descriptor.
int TotalIterations
Get/set the total iterations.
virtual string GpuOverride
Get/set the GPU ID's to use as an override.
SettingsCaffe Settings
Get/set the settings of the Project.
bool Active
Returns whether or not the project is active.
ParameterDescriptorCollection Parameters
Returns the collection of parameters of the Project.
DatasetDescriptor Dataset
Get/set the dataset used.
The ValueDescriptorCollection class contains a list of ValueDescriptor's.
The descriptors namespace contains all descriptor used to describe various items stored within the da...