MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The memory collection stores a set of memory items. More...
Public Member Functions | |
MemoryCollection (int nMax) | |
The constructor. More... | |
virtual void | Add (MemoryItem item) |
Adds a new memory item to the array of items and if at capacity, removes an item. More... | |
MemoryCollection | GetRandomSamples (CryptoRandom random, int nCount) |
Retrieves a random sample of items from the list. More... | |
List< StateBase > | GetNextState () |
Returns the list of Next State items. More... | |
List< SimpleDatum > | GetNextStateData () |
Returns the list of data items associated with the next state. More... | |
List< SimpleDatum > | GetNextStateClip () |
Returns the list of clip items associated with the next state. More... | |
List< SimpleDatum > | GetCurrentStateData () |
Returns the list of data items associated with the current state. More... | |
List< SimpleDatum > | GetCurrentStateClip () |
Returns the list of clip items associated with the current state. More... | |
float[] | GetActionsAsOneHotVector (int nActionCount) |
Returns the action items as a set of one-hot vectors. More... | |
float[] | GetInvertedDoneAsOneHotVector () |
Returns the inverted done (1 - done) values as a one-hot vector. More... | |
float[] | GetRewards () |
Returns the rewards as a vector. More... | |
void | Save (string strFile) |
Save the memory items to file. More... | |
void | Load (string strFile) |
Load all memory items from file. More... | |
Protected Attributes | |
MemoryItem[] | m_rgItems |
Specifies the memory item list. More... | |
int | m_nNextIdx = 0 |
Specifies the next available index in the rolling list. More... | |
Properties | |
int[] | Indexes [getset] |
Get/set the indexes associated with the collection (if any). More... | |
double[] | Priorities [getset] |
Get/set the priorities associated with the collection (if any). More... | |
int | NextIndex [get] |
Returns the next index. More... | |
int | Count [get] |
Returns the current count of items. More... | |
MemoryItem | this[int nIdx] [get] |
Get/set the memory item at a given index. More... | |
The memory collection stores a set of memory items.
Definition at line 14 of file MemoryCollection.cs.
MyCaffe.trainers.common.MemoryCollection.MemoryCollection | ( | int | nMax | ) |
The constructor.
nMax | Specifies the maximum number of items to store. |
Definition at line 32 of file MemoryCollection.cs.
|
virtual |
Adds a new memory item to the array of items and if at capacity, removes an item.
item | Specifies the memory item to add. |
Definition at line 85 of file MemoryCollection.cs.
float[] MyCaffe.trainers.common.MemoryCollection.GetActionsAsOneHotVector | ( | int | nActionCount | ) |
Returns the action items as a set of one-hot vectors.
nActionCount | Specifies the action count. |
Definition at line 175 of file MemoryCollection.cs.
List< SimpleDatum > MyCaffe.trainers.common.MemoryCollection.GetCurrentStateClip | ( | ) |
Returns the list of clip items associated with the current state.
Definition at line 162 of file MemoryCollection.cs.
List< SimpleDatum > MyCaffe.trainers.common.MemoryCollection.GetCurrentStateData | ( | ) |
Returns the list of data items associated with the current state.
Definition at line 153 of file MemoryCollection.cs.
float[] MyCaffe.trainers.common.MemoryCollection.GetInvertedDoneAsOneHotVector | ( | ) |
Returns the inverted done (1 - done) values as a one-hot vector.
Definition at line 196 of file MemoryCollection.cs.
List< StateBase > MyCaffe.trainers.common.MemoryCollection.GetNextState | ( | ) |
Returns the list of Next State items.
Definition at line 123 of file MemoryCollection.cs.
List< SimpleDatum > MyCaffe.trainers.common.MemoryCollection.GetNextStateClip | ( | ) |
Returns the list of clip items associated with the next state.
Definition at line 141 of file MemoryCollection.cs.
List< SimpleDatum > MyCaffe.trainers.common.MemoryCollection.GetNextStateData | ( | ) |
Returns the list of data items associated with the next state.
Definition at line 132 of file MemoryCollection.cs.
MemoryCollection MyCaffe.trainers.common.MemoryCollection.GetRandomSamples | ( | CryptoRandom | random, |
int | nCount | ||
) |
Retrieves a random sample of items from the list.
random | Specifies the random number generator to use. |
nCount | Specifies the number of items to retrieve. |
Definition at line 103 of file MemoryCollection.cs.
float[] MyCaffe.trainers.common.MemoryCollection.GetRewards | ( | ) |
Returns the rewards as a vector.
Definition at line 215 of file MemoryCollection.cs.
void MyCaffe.trainers.common.MemoryCollection.Load | ( | string | strFile | ) |
Load all memory items from file.
strFile | Specifies the file containing the memory items. |
Definition at line 244 of file MemoryCollection.cs.
void MyCaffe.trainers.common.MemoryCollection.Save | ( | string | strFile | ) |
Save the memory items to file.
strFile | Specifies the file name. |
Definition at line 224 of file MemoryCollection.cs.
|
protected |
Specifies the next available index in the rolling list.
Definition at line 26 of file MemoryCollection.cs.
|
protected |
Specifies the memory item list.
Definition at line 22 of file MemoryCollection.cs.
|
get |
Returns the current count of items.
Definition at line 66 of file MemoryCollection.cs.
|
getset |
Get/set the indexes associated with the collection (if any).
Definition at line 40 of file MemoryCollection.cs.
|
get |
Returns the next index.
Definition at line 58 of file MemoryCollection.cs.
|
getset |
Get/set the priorities associated with the collection (if any).
Definition at line 49 of file MemoryCollection.cs.
|
get |
Get/set the memory item at a given index.
nIdx | Specifies the index of the item to access. |
Definition at line 76 of file MemoryCollection.cs.