View source: R/piece_transformer.R
| pt_transformer | R Documentation |
Creates the model with its weights at their initial values. To run a trained
one, use pt_transformer_load, which builds this and then fills
it from a checkpoint.
pt_transformer(
layout,
d_model = 256L,
n_heads = 8L,
n_layers = 4L,
ff_dim = 1024L,
n_actions = 24L,
activation = "relu"
)
layout |
A layout list, as |
d_model |
Width of the model (default 256). |
n_heads |
Attention heads (default 8). |
n_layers |
Encoder blocks (default 4). |
ff_dim |
Width of the feed-forward hidden layer (default 1024). |
n_actions |
Size of the output — one value per action (default 24). |
activation |
Feed-forward activation, |
A pt_transformer object.
pt_transformer_load, pt_forward
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.