| ag_load_state_dict | R Documentation |
Writes a state from ag_state_dict (or the container of an
ag_save_model file read with readRDS) into model
in place. Device-resident weights are overwritten in their own buffers, so
an optimizer built on the model stays valid and keeps its residency. Values
are converted to the model's dtype on upload.
ag_load_state_dict(model, state, strict = TRUE)
model |
Target model (see |
state |
A state dict. |
strict |
|
Everything is checked before anything is written: an error leaves the model untouched.
model, invisibly.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.