MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The Brain uses the instance of MyCaffe (e.g. the open project) to run new actions and train the network. More...
Public Member Functions | |
Brain (MyCaffeControl< T > mycaffe, PropertySet properties, CryptoRandom random, Phase phase) | |
The constructor. More... | |
void | Dispose () |
Release all resources used by the Brain. More... | |
GetDataArgs | getDataArgs (Phase phase, int nAction) |
Returns the GetDataArgs used to retrieve new data from the envrionment implemented by derived parent trainer. More... | |
SimpleDatum | Preprocess (StateBase s, bool bUseRawInput, out bool bDifferent, bool bReset=false) |
Preprocesses the data. More... | |
int | act (SimpleDatum sd, SimpleDatum sdClip, int nActionCount) |
Returns the action from running the model. The action returned is either randomly selected (when using Exploration), or calculated via a forward pass (when using Exploitation). More... | |
bool | GetModelUpdated () |
Get whether or not the model has been udpated or not. More... | |
void | UpdateTargetModel () |
The UpdateTargetModel transfers the trained layers from the active Net to the target Net. More... | |
void | Train (int nIteration, MemoryCollection rgSamples, int nActionCount) |
Train the model at the current iteration. More... | |
void | OnOverlay (OverlayArgs e) |
The OnOverlay callback is called just before displaying the gym image, thus allowing for an overlay to be applied to the image. More... | |
Properties | |
int | FrameStack [get] |
Specifies the number of frames per X value. More... | |
int | BatchSize [get] |
Returns the batch size defined by the model. More... | |
Log | Log [get] |
Returns the output log. More... | |
CancelEvent | Cancel [get] |
Returns the Cancel event used to cancel all MyCaffe tasks. More... | |
The Brain uses the instance of MyCaffe (e.g. the open project) to run new actions and train the network.
T | Specifies the base type, which should be the same base type used for MyCaffe. This type is either double or float. |
Definition at line 438 of file TrainerC51.cs.
MyCaffe.trainers.dqn.c51.st.Brain< T >.Brain | ( | MyCaffeControl< T > | mycaffe, |
PropertySet | properties, | ||
CryptoRandom | random, | ||
Phase | phase | ||
) |
The constructor.
mycaffe | Specifies the instance of MyCaffe assoiated with the open project - when using more than one Brain, this is the master project. |
properties | Specifies the properties passed into the trainer. |
random | Specifies the random number generator used. |
phase | Specifies the phase under which to run. |
Definition at line 491 of file TrainerC51.cs.
int MyCaffe.trainers.dqn.c51.st.Brain< T >.act | ( | SimpleDatum | sd, |
SimpleDatum | sdClip, | ||
int | nActionCount | ||
) |
Returns the action from running the model. The action returned is either randomly selected (when using Exploration), or calculated via a forward pass (when using Exploitation).
sd | Specifies the data to run the model on. |
sdClip | Specifies the clip data (if any exits). |
nActionCount | Returns the number of actions in the action set. |
Definition at line 769 of file TrainerC51.cs.
void MyCaffe.trainers.dqn.c51.st.Brain< T >.Dispose | ( | ) |
Release all resources used by the Brain.
Definition at line 567 of file TrainerC51.cs.
GetDataArgs MyCaffe.trainers.dqn.c51.st.Brain< T >.getDataArgs | ( | Phase | phase, |
int | nAction | ||
) |
Returns the GetDataArgs used to retrieve new data from the envrionment implemented by derived parent trainer.
phase | Specifies the phase under which to get the data. |
nAction | Specifies the action to run, or -1 to reset the environment. |
Definition at line 620 of file TrainerC51.cs.
bool MyCaffe.trainers.dqn.c51.st.Brain< T >.GetModelUpdated | ( | ) |
Get whether or not the model has been udpated or not.
Definition at line 793 of file TrainerC51.cs.
void MyCaffe.trainers.dqn.c51.st.Brain< T >.OnOverlay | ( | OverlayArgs | e | ) |
The OnOverlay callback is called just before displaying the gym image, thus allowing for an overlay to be applied to the image.
e | Specifies the arguments to the callback which contains the original display image. |
Implements MyCaffe.trainers.IxTrainerGetDataCallback.
Definition at line 1230 of file TrainerC51.cs.
SimpleDatum MyCaffe.trainers.dqn.c51.st.Brain< T >.Preprocess | ( | StateBase | s, |
bool | bUseRawInput, | ||
out bool | bDifferent, | ||
bool | bReset = false |
||
) |
Preprocesses the data.
s | Specifies the state and data to use. |
bUseRawInput | Specifies whether or not to use the raw data true, or a difference of the current and previous data false (default = false). |
bDifferent | Returns whether or not the current state data is different from the previous - note this is only set when NOT using raw input, otherwise true is always returned. |
bReset | Optionally, specifies to reset the last sd to null. |
Definition at line 666 of file TrainerC51.cs.
void MyCaffe.trainers.dqn.c51.st.Brain< T >.Train | ( | int | nIteration, |
MemoryCollection | rgSamples, | ||
int | nActionCount | ||
) |
Train the model at the current iteration.
nIteration | Specifies the current iteration. |
rgSamples | Contains the samples to train the model with. |
nActionCount | Specifies the number of actions in the action set. |
Definition at line 817 of file TrainerC51.cs.
void MyCaffe.trainers.dqn.c51.st.Brain< T >.UpdateTargetModel | ( | ) |
The UpdateTargetModel transfers the trained layers from the active Net to the target Net.
Definition at line 803 of file TrainerC51.cs.
|
get |
Returns the batch size defined by the model.
Definition at line 637 of file TrainerC51.cs.
|
get |
Returns the Cancel event used to cancel all MyCaffe tasks.
Definition at line 653 of file TrainerC51.cs.
|
get |
Specifies the number of frames per X value.
Definition at line 629 of file TrainerC51.cs.
|
get |
Returns the output log.
Definition at line 645 of file TrainerC51.cs.