Multi layer character level RNN: a character level network backed by a stack of RNN layers.
MultiLayerCharLevelRNN
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| .ctor | 2 | Constructs without initialization. |
| SetHiddenSize | 1 | Sets the hidden layer sizes of the wrapped network. |
| SetLearningRate | 1 | Sets the learning rate of the wrapped network. |
| initialize | 1 | Initializes the network for the given alphabet. |
| forwardBackward | 1 | Performs a forward-backward pass for the given token indices. |
| sampleIndices | 2 | Samples n indices, optionally advancing the hidden state. |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| Alphabet | 1 | Returns the alphabet, if initialized. |
| Initialized | 1 | Returns true if the net was initialized. |
| VocabularySize | 1 | Returns the vocabulary size (the alphabet size), if initialized. |
04 Fields
| Name | Overloads | Summary |
|---|---|---|
| m_alphabet | 1 | The alphabet for sampling. |
| internal | 1 | Basic network. |
05 Members
Constructs without initialization.
Creates the network and initializes it immediately.
| Name | Type | Description |
|---|---|---|
alphabet | Alphabet | The alphabet; it must not be |
Int32())Sets the hidden layer sizes of the wrapped network. The network must be initialized again afterwards.
| Name | Type | Description |
|---|---|---|
value | Int32() | The hidden size of every layer. |
Double)Sets the learning rate of the wrapped network.
| Name | Type | Description |
|---|---|---|
value | Double | The learning rate. |
Initializes the network for the given alphabet.
| Name | Type | Description |
|---|---|---|
alphabet | Alphabet | The alphabet; it must not be |
Int32(), Int32())Performs a forward-backward pass for the given token indices.
| Name | Type | Description |
|---|---|---|
ix | Int32() | The input indices; its length must match iy and must not be empty. |
iy | Int32() | The target indices; every index must be smaller than the vocabulary size. |
The cross-entropy loss of this sequence.
Int32, Int32(), Double)Samples n indices, advancing the hidden state.
| Name | Type | Description |
|---|---|---|
n | Int32 | Number of indices to sample. |
seed | Int32() | The seed indices. |
temp | Double | Sampling temperature in |
The sampled indices.
Int32, Int32(), Double, Boolean)Samples n indices, optionally advancing the hidden state.
| Name | Type | Description |
|---|---|---|
n | Int32 | Number of indices to sample. |
seed | Int32() | The seed indices. |
temp | Double | Sampling temperature in |
advance | Boolean | When |
The sampled indices.
Returns the alphabet, if initialized.
Returns true if the net was initialized.
Returns the vocabulary size (the alphabet size), if initialized.
The alphabet for sampling.
Basic network.