| ag_state_dict | R Documentation |
A copy of every parameter and persistent buffer (ag_batch_norm
running statistics) as host matrices, keyed like model$parameters().
Values are R doubles whatever the device or ag_dtype(): an f32 value
is represented exactly, so a state taken on the GPU in f32 restores on the
CPU (or back) to the same numbers. f16/bf16 weights carry only their own
precision; continuing exactly across f16 and f32 is not possible.
ag_state_dict(model)
model |
An |
Use it for checkpoints, for copying weights between models (target networks:
ag_load_state_dict(target, ag_state_dict(online))), or with
saveRDS. As with any .rds, only read files you trust.
A list with parameters, buffers and
param_dtypes, plus format/version.
ag_load_state_dict, ag_save_model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.