![]() |
MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The NumpyFile reads data from a numpy file in the base type specified. More...
Public Member Functions | |
| NumpyFile (Log log) | |
| The constructor. More... | |
| void | Dispose () |
| Dispose all resources and close the file. More... | |
| void | Close () |
| Close the file if open. More... | |
| void | OpenRead (string strFile) |
| Open the numpy file for reading, and read in the header information. More... | |
| T[] | LoadRow (T[] rgVal, int nRowIdx, int nStartIdx=0, int nColumnCount=int.MaxValue) |
| Load a single row (or portion of a row) from the numpy file. More... | |
| List< T[]> | Load (int nStartIdx=0, int nCount=int.MaxValue) |
| Load the data from the numpy file, optionally specifying the starting row index and number of rows to read, each row is read in its entirety. More... | |
Properties | |
| Type | DataType [get] |
| Return the base data type in the Numpy file. More... | |
| int[] | Shape [get] |
| Return the data shape of the data in the Numpy file. More... | |
| int | Rows [get] |
| Returns the number of rows. More... | |
| int | Columns [get] |
| Returns the number of items per row. More... | |
| int | Fields [get] |
| Returns the number of fields per column item. More... | |
| int | TotalCount [get] |
| Returns the total number of items * fields in the data. More... | |
The NumpyFile reads data from a numpy file in the base type specified.
| T | Specifies the base type (e.g, long, int, float, double). |
Definition at line 17 of file NumpyFile.cs.
| MyCaffe.common.NumpyFile< T >.NumpyFile | ( | Log | log | ) |
The constructor.
| log | Specifies the output log (or null to ignore). |
Definition at line 38 of file NumpyFile.cs.
| void MyCaffe.common.NumpyFile< T >.Close | ( | ) |
Close the file if open.
Definition at line 54 of file NumpyFile.cs.
| void MyCaffe.common.NumpyFile< T >.Dispose | ( | ) |
Dispose all resources and close the file.
Definition at line 46 of file NumpyFile.cs.
| List< T[]> MyCaffe.common.NumpyFile< T >.Load | ( | int | nStartIdx = 0, |
| int | nCount = int.MaxValue |
||
| ) |
Load the data from the numpy file, optionally specifying the starting row index and number of rows to read, each row is read in its entirety.
| nStartIdx | |
| nCount |
| Exception | An exception is thrown on error. |
Definition at line 332 of file NumpyFile.cs.
| T[] MyCaffe.common.NumpyFile< T >.LoadRow | ( | T[] | rgVal, |
| int | nRowIdx, | ||
| int | nStartIdx = 0, |
||
| int | nColumnCount = int.MaxValue |
||
| ) |
Load a single row (or portion of a row) from the numpy file.
| rgVal | Specifies the array where data is copied (this value is also returned). |
| nRowIdx | Specifies the row index. |
| nStartIdx | Specifies the start index into the row (default = 0). |
| nColumnCount | Specifies the number of items to read from the start index (default = int.MaxValue to read entire row). |
| Exception | An exception is thrown on error. |
Definition at line 290 of file NumpyFile.cs.
| void MyCaffe.common.NumpyFile< T >.OpenRead | ( | string | strFile | ) |
Open the numpy file for reading, and read in the header information.
| strFile | Specifies the numpy file to read. |
| Exception | An exception is thrown when trying to read a numpy file in fortran order. |
Definition at line 132 of file NumpyFile.cs.
|
get |
Returns the number of items per row.
Definition at line 98 of file NumpyFile.cs.
|
get |
Return the base data type in the Numpy file.
Definition at line 74 of file NumpyFile.cs.
|
get |
Returns the number of fields per column item.
Definition at line 106 of file NumpyFile.cs.
|
get |
Returns the number of rows.
Definition at line 90 of file NumpyFile.cs.
|
get |
Return the data shape of the data in the Numpy file.
Definition at line 82 of file NumpyFile.cs.
|
get |
Returns the total number of items * fields in the data.
Definition at line 114 of file NumpyFile.cs.