MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
Datum.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace MyCaffe.basecode
7{
11 public class Datum : SimpleDatum
12 {
16 public Datum() : base()
17 {
18 }
19
32 public Datum(bool bIsReal, int nChannels, int nWidth, int nHeight, int nLabel = -1, DateTime? dtTime = null, int nBoost = 0, bool bAutoLabeled = false, int nIdx = -1)
33 : base(bIsReal, nChannels, nWidth, nHeight, nLabel, dtTime, nBoost, bAutoLabeled, nIdx)
34 {
35 }
36
50 public Datum(bool bIsReal, int nChannels, int nWidth, int nHeight, int nLabel, DateTime dtTime, List<byte> rgData, int nBoost, bool bAutoLabeled, int nIdx)
51 : base(bIsReal, nChannels, nWidth, nHeight, nLabel, dtTime, rgData, nBoost, bAutoLabeled, nIdx)
52 {
53 }
54
68 public Datum(bool bIsReal, int nChannels, int nWidth, int nHeight, int nLabel, DateTime dtTime, List<double> rgfData, int nBoost, bool bAutoLabeled, int nIdx)
69 : base(bIsReal, nChannels, nWidth, nHeight, nLabel, dtTime, rgfData, nBoost, bAutoLabeled, nIdx)
70 {
71 }
72
86 public Datum(bool bIsReal, int nChannels, int nWidth, int nHeight, int nLabel, DateTime dtTime, List<float> rgfData, int nBoost, bool bAutoLabeled, int nIdx)
87 : base(bIsReal, nChannels, nWidth, nHeight, nLabel, dtTime, rgfData, nBoost, bAutoLabeled, nIdx)
88 {
89 }
90
96 public Datum(SimpleDatum d, bool bCopyData = false)
97 : base(d, bCopyData)
98 {
99 }
100
106 public Datum(Datum d, bool bCopyData = false)
107 : base(d, bCopyData)
108 {
109 }
110
114 public int channels
115 {
116 get { return Channels; }
117 }
118
122 public int height
123 {
124 get { return Height; }
125 }
126
130 public int width
131 {
132 get { return Width; }
133 }
134
138 public int index
139 {
140 get { return Index; }
141 }
142
146 public float[] float_data
147 {
148 get { return RealDataF; }
149 }
150
154 public double[] double_data
155 {
156 get { return RealDataD; }
157 }
158
162 public byte[] data
163 {
164 get { return ByteData; }
165 }
166
170 public int label
171 {
172 get { return Label; }
173 }
174 }
175}
The Datum class is a simple wrapper to the SimpleDatum class to ensure compatibility with the origina...
Definition: Datum.cs:12
Datum(bool bIsReal, int nChannels, int nWidth, int nHeight, int nLabel=-1, DateTime? dtTime=null, int nBoost=0, bool bAutoLabeled=false, int nIdx=-1)
The Datum constructor.
Definition: Datum.cs:32
double[] double_data
Returns the data as an array of double. The datum must be initialized with bIsReal = true with double...
Definition: Datum.cs:155
Datum(bool bIsReal, int nChannels, int nWidth, int nHeight, int nLabel, DateTime dtTime, List< byte > rgData, int nBoost, bool bAutoLabeled, int nIdx)
The Datum constructor.
Definition: Datum.cs:50
float[] float_data
Returns the data as an array of float. The datum must be initialized with bIsReal = true with float d...
Definition: Datum.cs:147
Datum(bool bIsReal, int nChannels, int nWidth, int nHeight, int nLabel, DateTime dtTime, List< float > rgfData, int nBoost, bool bAutoLabeled, int nIdx)
The Datum constructor.
Definition: Datum.cs:86
int label
Returns the known label of the data.
Definition: Datum.cs:171
Datum(bool bIsReal, int nChannels, int nWidth, int nHeight, int nLabel, DateTime dtTime, List< double > rgfData, int nBoost, bool bAutoLabeled, int nIdx)
The Datum constructor.
Definition: Datum.cs:68
Datum(Datum d, bool bCopyData=false)
The Datum constructor.
Definition: Datum.cs:106
int height
Specifies the height of the data.
Definition: Datum.cs:123
Datum()
The Datum constructor.
Definition: Datum.cs:16
Datum(SimpleDatum d, bool bCopyData=false)
The Datum constructor.
Definition: Datum.cs:96
byte[] data
Returns the non-real data as an array of bytes. The datum must be initialized with bIsReal = false.
Definition: Datum.cs:163
int index
Specifies the index of the data.
Definition: Datum.cs:139
int width
Specifies the width of the data.
Definition: Datum.cs:131
int channels
Returns the number of channels in the data.
Definition: Datum.cs:115
The SimpleDatum class holds a data input within host memory.
Definition: SimpleDatum.cs:161
int Channels
Return the number of channels of the data.
float[] RealDataF
Return the float data. This field is valid when IsRealData = true.
int Width
Return the width of the data.
byte[] ByteData
Return the byte data. This field is valid when IsRealData = false.
int Index
Returns the index of the SimpleDatum.
int Height
Return the height of the data.
double[] RealDataD
Return the double data. This field is valid when IsRealData = true.
int Label
Return the known label of the data.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
Definition: Annotation.cs:12