| ar_load_weights | R Documentation |
Extracts the torch state dictionary (the named parameter tensors) from a
downloaded weights file.
ar_load_weights(
model = "linear_sleepstages",
weights_dir = ar_cache_dir(),
as_r = TRUE
)
model |
a single model name, see |
weights_dir |
directory where the weights are (to be) stored.
If |
as_r |
If |
A named list of arrays or a Python object.
# Runs only after ar_setup(), so Python is not set up otherwise
if (ar_have_weights("linear_sleepstages") &&
ar_python_modules_installed()) {
sd = ar_load_weights("linear_sleepstages")
names(sd)[1:5]
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.