![]() |
MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The DataGeneral Gym provides access to the MyCaffe Streaming Database with GENERAL query types. More...
Public Member Functions | |
| DataGeneralGym () | |
| The constructor. More... | |
| void | Dispose () |
| Release all resources used. More... | |
| void | Initialize (Log log, PropertySet properties) |
| Initialize the gym with the specified properties. More... | |
| IXMyCaffeGym | Clone (PropertySet properties=null) |
| Create a new copy of the gym. More... | |
| Dictionary< string, int > | GetActionSpace () |
| Returns the action space as a dictionary of name,actionid pairs. More... | |
| void | Close () |
| Shutdown and close the gym. More... | |
| Tuple< Bitmap, SimpleDatum > | Render (bool bShowUi, int nWidth, int nHeight, bool bGetAction) |
| Render the gym's current state on a bitmap and SimpleDatum. More... | |
| Tuple< Bitmap, SimpleDatum > | Render (bool bShowUi, int nWidth, int nHeight, double[] rgData, bool bGetAction) |
| Render the gyms specified data. More... | |
| Tuple< State, double, bool > | Reset (bool bGetLabel, PropertySet props=null) |
| Reset the state of the gym. More... | |
| Tuple< State, double, bool > | Step (int nAction, bool bGetLabel, PropertySet propExtra=null) |
| Step the gym one step in the data. More... | |
| DatasetDescriptor | GetDataset (DATA_TYPE dt, Log log=null) |
| Returns the dataset descriptor of the dynamic dataset produced by the Gym. More... | |
| byte[] | ConvertOutput (Stage stage, int nN, float[] rg, out string type) |
| Converts the output values into the native type used by the Gym during queries. More... | |
Properties | |
| bool | RequiresDisplayImage [get] |
| Returns true indicating that this Gym requires a display image. More... | |
| DATA_TYPE | SelectedDataType [get] |
| Returns the selected data type. More... | |
| DATA_TYPE[] | SupportedDataType [get] |
| Returns the data types supported by this gym. More... | |
| string | Name [get] |
| Returns the gym's name. More... | |
| int | UiDelay [get] |
| Returns the delay to use (if any) when the user-display is visible. More... | |
| double | TestingPercent [get] |
| Returns the testinng percent of 0.2. More... | |
| Phase | ActivePhase [getset] |
| Get/set the active phase under which the reset and next run. More... | |
Properties inherited from MyCaffe.gym.IXMyCaffeGymData | |
| Phase | ActivePhase [getset] |
| Specifies the active phase under which to get the data reset and next. More... | |
Properties inherited from MyCaffe.gym.IXMyCaffeGym | |
| string | Name [get] |
| Returns the name of the gym. More... | |
| int | UiDelay [get] |
| Returns the user-interface delay to use (if any). More... | |
| DATA_TYPE | SelectedDataType [get] |
| Returns the selected data-type. More... | |
| DATA_TYPE[] | SupportedDataType [get] |
| Returns an array of data types supported by the gym. More... | |
| bool | RequiresDisplayImage [get] |
| Returns whether or not the gym requires the display image. More... | |
| double | TestingPercent [get] |
| Returns the percentage of the data to use for testing, or -1 which then uses the default of 0.2. More... | |
The DataGeneral Gym provides access to the MyCaffe Streaming Database with GENERAL query types.
Definition at line 22 of file DataGeneralGym.cs.
| MyCaffe.gym.DataGeneralGym.DataGeneralGym | ( | ) |
The constructor.
Definition at line 35 of file DataGeneralGym.cs.
| IXMyCaffeGym MyCaffe.gym.DataGeneralGym.Clone | ( | PropertySet | properties = null | ) |
Create a new copy of the gym.
| properties | Optionally, specifies the properties to initialize the new copy with. |
Implements MyCaffe.gym.IXMyCaffeGym.
Definition at line 71 of file DataGeneralGym.cs.
| void MyCaffe.gym.DataGeneralGym.Close | ( | ) |
Shutdown and close the gym.
Implements MyCaffe.gym.IXMyCaffeGym.
Definition at line 141 of file DataGeneralGym.cs.
| byte[] MyCaffe.gym.DataGeneralGym.ConvertOutput | ( | Stage | stage, |
| int | nN, | ||
| float[] | rg, | ||
| out string | type | ||
| ) |
Converts the output values into the native type used by the Gym during queries.
| stage | Specifies the stage under which the conversion is run. |
| nN | Specifies the number of outputs. |
| rg | Specifies the raw output data. |
| type | Returns the output type. |
Note: Currently, only data gym's implement this function.
Implements MyCaffe.gym.IXMyCaffeGymData.
Definition at line 249 of file DataGeneralGym.cs.
| void MyCaffe.gym.DataGeneralGym.Dispose | ( | ) |
Release all resources used.
Definition at line 42 of file DataGeneralGym.cs.
| Dictionary< string, int > MyCaffe.gym.DataGeneralGym.GetActionSpace | ( | ) |
Returns the action space as a dictionary of name,actionid pairs.
Implements MyCaffe.gym.IXMyCaffeGym.
Definition at line 133 of file DataGeneralGym.cs.
| DatasetDescriptor MyCaffe.gym.DataGeneralGym.GetDataset | ( | DATA_TYPE | dt, |
| Log | log = null |
||
| ) |
Returns the dataset descriptor of the dynamic dataset produced by the Gym.
| dt | Specifies the data-type to use. |
| log | Optionally, specifies the output log to use (default = null). |
Implements MyCaffe.gym.IXMyCaffeGym.
Definition at line 209 of file DataGeneralGym.cs.
| void MyCaffe.gym.DataGeneralGym.Initialize | ( | Log | log, |
| PropertySet | properties | ||
| ) |
Initialize the gym with the specified properties.
| log | Specifies the output log to use. |
| properties | Specifies the properties containing Gym specific initialization parameters. |
The DataGym uses the following initialization properties.
'DbSettings' - returns the database settings based on the QUERY_TYPE used. 'DbSchema' - returns the database schema.
Implements MyCaffe.gym.IXMyCaffeGym.
Definition at line 57 of file DataGeneralGym.cs.
| Tuple< Bitmap, SimpleDatum > MyCaffe.gym.DataGeneralGym.Render | ( | bool | bShowUi, |
| int | nWidth, | ||
| int | nHeight, | ||
| bool | bGetAction | ||
| ) |
Render the gym's current state on a bitmap and SimpleDatum.
| bShowUi | When true the Bitmap is drawn. |
| nWidth | Specifies the width used to size the Bitmap. |
| nHeight | Specifies the height used to size the Bitmap. |
| bGetAction | When true the action data is returned as a SimpleDatum. |
Implements MyCaffe.gym.IXMyCaffeGym.
Definition at line 154 of file DataGeneralGym.cs.
| Tuple< Bitmap, SimpleDatum > MyCaffe.gym.DataGeneralGym.Render | ( | bool | bShowUi, |
| int | nWidth, | ||
| int | nHeight, | ||
| double[] | rgData, | ||
| bool | bGetAction | ||
| ) |
Render the gyms specified data.
| bShowUi | When true the Bitmap is drawn. |
| nWidth | Specifies the width used to size the Bitmap. |
| nHeight | Specifies the height used to size the Bitmap. |
| rgData | Specifies the gym data to render. |
| bGetAction | When true the action data is returned as a SimpleDatum. |
Implements MyCaffe.gym.IXMyCaffeGym.
Definition at line 169 of file DataGeneralGym.cs.
| Tuple< State, double, bool > MyCaffe.gym.DataGeneralGym.Reset | ( | bool | bGetLabel, |
| PropertySet | props = null |
||
| ) |
Reset the state of the gym.
| bGetLabel | Not used. |
| props | Optionally, specifies extra properties. |
Implements MyCaffe.gym.IXMyCaffeGym.
Definition at line 180 of file DataGeneralGym.cs.
| Tuple< State, double, bool > MyCaffe.gym.DataGeneralGym.Step | ( | int | nAction, |
| bool | bGetLabel, | ||
| PropertySet | propExtra = null |
||
| ) |
Step the gym one step in the data.
| nAction | Specifies the action to run on the gym. |
| bGetLabel | Not used. |
| propExtra | Optionally, specifies extra parameters. |
Implements MyCaffe.gym.IXMyCaffeGym.
Definition at line 193 of file DataGeneralGym.cs.
|
getset |
Get/set the active phase under which the reset and next run.
Definition at line 257 of file DataGeneralGym.cs.
|
get |
Returns the gym's name.
Definition at line 108 of file DataGeneralGym.cs.
|
get |
Returns true indicating that this Gym requires a display image.
Definition at line 84 of file DataGeneralGym.cs.
|
get |
Returns the selected data type.
Definition at line 92 of file DataGeneralGym.cs.
|
get |
Returns the data types supported by this gym.
Definition at line 100 of file DataGeneralGym.cs.
|
get |
Returns the testinng percent of 0.2.
Definition at line 124 of file DataGeneralGym.cs.
|
get |
Returns the delay to use (if any) when the user-display is visible.
Definition at line 116 of file DataGeneralGym.cs.