jit_serialize | R Documentation |
Serializes a script module and returns it as a raw vector.
You can read the object again using jit_unserialize
.
jit_serialize(obj)
obj |
( |
raw()
if (torch_is_installed()) {
model <- jit_trace(nn_linear(1, 1), torch_randn(1))
serialized <- jit_serialize(model)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.