MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
ProgressInfo.cs
1// Copyright (c) 2018-2020 SignalPop LLC, and contributors. All rights reserved.
2// License: Apache 2.0
3// License: https://github.com/MyCaffe/MyCaffe/blob/master/LICENSE
4// Original Source: https://github.com/MyCaffe/MyCaffe/blob/master/MyCaffe.data/ProgressInfo.cs
5using System;
6using System.Collections.Generic;
7using System.Linq;
8using System.Text;
9using System.Threading.Tasks;
10
11namespace MyCaffe.data
12{
16 public class ProgressInfo
17 {
18 long m_nIdx;
19 long m_nTotal;
20 string m_strMsg;
21 Exception m_err;
22 bool? m_bAlive = null;
23
32 public ProgressInfo(long nIdx, long nTotal, string str, Exception err = null, bool? bAlive = null)
33 {
34 m_nIdx = nIdx;
35 m_nTotal = nTotal;
36 m_strMsg = str;
37 m_err = err;
38 m_bAlive = bAlive;
39 }
40
44 public long Index
45 {
46 get { return m_nIdx; }
47 }
48
52 public long Total
53 {
54 get { return m_nTotal; }
55 }
56
60 public double Percentage
61 {
62 get { return (m_nTotal == 0) ? 0 : (double)m_nIdx / (double)m_nTotal; }
63 }
64
68 public string Message
69 {
70 get { return m_strMsg; }
71 }
72
76 public Exception Error
77 {
78 get { return m_err; }
79 }
80
84 public bool? Alive
85 {
86 get { return m_bAlive; }
87 set { m_bAlive = value; }
88 }
89 }
90}
The ProgressInfo is used when reporting the overall progress of creating a dataset.
Definition: ProgressInfo.cs:17
bool? Alive
Returns whether or not the process is alive or not.
Definition: ProgressInfo.cs:85
long Total
Return the total items to process.
Definition: ProgressInfo.cs:53
double? Percentage
Returns the percentage of the current process.
Definition: ProgressInfo.cs:61
Exception Error
Returns the error if one occurred, or null.
Definition: ProgressInfo.cs:77
string Message
Returns the message as a string.
Definition: ProgressInfo.cs:69
long Index
Return the current index in the process.
Definition: ProgressInfo.cs:45
ProgressInfo(long nIdx, long nTotal, string str, Exception err=null, bool? bAlive=null)
The constructor.
Definition: ProgressInfo.cs:32
The MyCaffe.data namespace contains dataset creators used to create common testing datasets such as M...
Definition: BinaryFile.cs:16