Description Usage Arguments Value Examples
View source: R/visualize_attention.R
Given data from an RBERT model, display an interactive visualization of the attention weights.
1 2 3 4 5 6 7 |
attention |
The "attention" component of the output from
|
sequence_index |
Integer; which example sequence from the input to visualize. |
height, width |
Characters; height and width of the htmlwidget
specified in any valid |
elementId |
Character; a valid |
the output from htmlwidgets::createWidget
.
1 2 3 4 5 6 7 | ## Not run:
# assuming something like the following has been run:
# feats <- RBERT::extract_features(...) # See RBERT documentation
# Then:
visualize_attention(feats$attention)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.