MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The TrainerPG implements a simple Policy Gradient trainer inspired by Andrej Karpathy's blog posed referenced. More...
Public Member Functions | |
TrainerPG (MyCaffeControl< T > mycaffe, PropertySet properties, CryptoRandom random, IxTrainerCallback icallback) | |
The constructor. More... | |
void | Dispose () |
Releases all resources used. More... | |
bool | Initialize () |
Initialize the trainer. More... | |
bool | Shutdown (int nWait) |
Shutdown the trainer. More... | |
ResultCollection | RunOne (int nDelay=1000) |
Run a single cycle on the environment after the delay. More... | |
byte[] | Run (int nN, PropertySet runProp, out string type) |
Run a set of iterations and return the resuts. More... | |
bool | Test (int nN, ITERATOR_TYPE type) |
Run the test cycle - currently this is not implemented. More... | |
bool | Train (int nN, ITERATOR_TYPE type, TRAIN_STEP step) |
Train the network using a modified PG training algorithm optimized for GPU use. More... | |
The TrainerPG implements a simple Policy Gradient trainer inspired by Andrej Karpathy's blog posed referenced.
Definition at line 25 of file TrainerPG.cs.
MyCaffe.trainers.pg.st.TrainerPG< T >.TrainerPG | ( | MyCaffeControl< T > | mycaffe, |
PropertySet | properties, | ||
CryptoRandom | random, | ||
IxTrainerCallback | icallback | ||
) |
The constructor.
mycaffe | Specifies the MyCaffeControl to use for learning and prediction. |
properties | Specifies the property set containing the key/value pairs of property settings. |
random | Specifies a Random number generator used for random selection. |
icallback | Specifies the callback for parent notifications and queries. |
Definition at line 39 of file TrainerPG.cs.
void MyCaffe.trainers.pg.st.TrainerPG< T >.Dispose | ( | ) |
Releases all resources used.
Definition at line 50 of file TrainerPG.cs.
bool MyCaffe.trainers.pg.st.TrainerPG< T >.Initialize | ( | ) |
Initialize the trainer.
Implements MyCaffe.trainers.IxTrainer.
Definition at line 58 of file TrainerPG.cs.
byte[] MyCaffe.trainers.pg.st.TrainerPG< T >.Run | ( | int | nN, |
PropertySet | runProp, | ||
out string | type | ||
) |
Run a set of iterations and return the resuts.
nN | Specifies the number of samples to run. |
runProp | Optionally specifies properties to use when running. |
type | Returns the data type contained in the byte stream. |
Implements MyCaffe.trainers.IxTrainerRL.
Definition at line 116 of file TrainerPG.cs.
ResultCollection MyCaffe.trainers.pg.st.TrainerPG< T >.RunOne | ( | int | nDelay = 1000 | ) |
Run a single cycle on the environment after the delay.
nDelay | Specifies a delay to wait before running. |
Implements MyCaffe.trainers.IxTrainerRL.
Definition at line 100 of file TrainerPG.cs.
bool MyCaffe.trainers.pg.st.TrainerPG< T >.Shutdown | ( | int | nWait | ) |
Shutdown the trainer.
nWait | Specifies a wait in ms. for the shutdown to complete. |
Implements MyCaffe.trainers.IxTrainer.
Definition at line 82 of file TrainerPG.cs.
bool MyCaffe.trainers.pg.st.TrainerPG< T >.Test | ( | int | nN, |
ITERATOR_TYPE | type | ||
) |
Run the test cycle - currently this is not implemented.
nN | Specifies the number of iterations (based on the ITERATION_TYPE) to run, or -1 to ignore. |
type | Specifies the iteration type (default = ITERATION). |
Implements MyCaffe.trainers.IxTrainer.
Definition at line 132 of file TrainerPG.cs.
bool MyCaffe.trainers.pg.st.TrainerPG< T >.Train | ( | int | nN, |
ITERATOR_TYPE | type, | ||
TRAIN_STEP | step | ||
) |
Train the network using a modified PG training algorithm optimized for GPU use.
nN | Specifies the number of iterations (based on the ITERATION_TYPE) to run, or -1 to ignore. |
type | Specifies the iteration type (default = ITERATION). |
step | Specifies the stepping mode to use (when debugging). |
Implements MyCaffe.trainers.IxTrainer.
Definition at line 158 of file TrainerPG.cs.