Description Usage Arguments Value
View source: R/2-layers-pseudo-embed.R
This function creates an embedding matrix in the form of a layer. This layer can be multiplied with other layers as if it were itself a weights matrix. This is because all samples within the embedding layer will always have the same activation.
1 | layer_pseudo_embed(object, embed_dim, random_embedding = FALSE, name = NULL)
|
object |
A |
embed_dim |
An integer. The size of the final embedding matrix will equal the input dimension times the embedding dimension. |
random_embedding |
A boolean. Toggles whether to freeze the embedding matrix with random values. Otherwise, the embedding matrix is trainable. |
name |
A string. The prefix label for all layers. |
A layer that acts like an embedding matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.