5using System.Collections.Generic;
8using System.Threading.Tasks;
43 if (m_blobInput !=
null)
49 if (m_blobOutput !=
null)
62 public void Initialize(
string strExtPath,
int nFields,
int nDepth)
66 m_extension.Initialize(strExtPath);
68 rgParam =
new List<float>();
72 float[] rgOut = m_extension.Run(
Extension<T>.FUNCTION.INITIALIZE, rgParam.ToArray());
73 int nOutputFields = (int)rgOut[0];
75 m_blobInput.
Reshape(1, 1, nFields, nDepth);
76 m_blobOutput.
Reshape(1, 1, nOutputFields, nDepth);
78 rgParam =
new List<float>();
79 rgParam.Add(m_blobInput.
count());
81 rgParam.Add(m_blobInput.
count());
83 rgParam.Add(m_blobOutput.
count());
85 rgParam.Add(m_blobOutput.
count());
87 m_extension.Run(
Extension<T>.FUNCTION.SETMEMORY, rgParam.ToArray());
94 public void Reset(
int nStartOffset)
96 m_idb.
Reset(nStartOffset);
111 if (typeof(T) == typeof(
float))
120 return new Tuple<Blob<T>,
SimpleDatum>(m_blobOutput,
null);
The MyCaffeControl is the main object used to manage all training, testing and running of the MyCaffe...
Log Log
Returns the Log (for output) used.
CudaDnn< T > Cuda
Returns the CudaDnn connection used.
The SimpleDatum class holds a data input within host memory.
float[] RealDataF
Return the float data. This field is valid when IsRealData = true.
double[] RealDataD
Return the double data. This field is valid when IsRealData = true.
The Blob is the main holder of data that moves through the Layers of the Net.
long mutable_gpu_diff
Returns the diff GPU handle used by the CudaDnn connection.
long mutable_gpu_data
Returns the data GPU handle used by the CudaDnn connection.
void Reshape(int nNum, int nChannels, int nHeight, int nWidth, bool? bUseHalfSize=null)
DEPRECIATED; use
int count()
Returns the total number of items in the Blob.
virtual void Dispose(bool bDisposing)
Releases all resources used by the Blob (including both GPU and Host).
The Extension class is used to add new pre-processor extension DLL's to MyCaffe.
The MgrPreprocessor manages the operations of the data pre-processor.
void Reset(int nStartOffset)
Reset the streaming database to the data start or an offset from the start.
void Dispose()
Release all resources used.
MgrPreprocessor(IXMyCaffe< T > imycaffe, IXStreamDatabase idb)
The constructor.
void Initialize(string strExtPath, int nFields, int nDepth)
Initialize the pre-processor.
Tuple< Blob< T >, SimpleDatum > Step(bool bGetSimpleDatum, int nWait)
Step to the next data in the streaming database and process it.
The IXMyCaffeExtension interface allows for easy extension management of the low-level software that ...
The IXMyCaffe interface contains functions used to perform MyCaffe operations that work with the MyCa...
The IXStreamDatabase interface is the main interface to the MyCaffe Streaing Database.
void Reset(int nStartOffset=0)
Reset the query postion to the start established during Initialize.
SimpleDatum Query(int nWait=1000)
Query a setgment of data from the internal queueus.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.common namespace contains common MyCaffe classes.
The MyCaffe.db.stream namespace contains all data streaming related classes.
The MyCaffe.preprocessor namespace contains all classes of the data preprocessors supported by MyCaff...
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...