View source: R/tensors.R View source: R/ggml.R
| ggml_set_f32 | R Documentation |
Set F32 data
Set F32 Data
ggml_set_f32(tensor, data)
ggml_set_f32(tensor, data)
tensor |
Tensor |
data |
Numeric vector |
NULL (invisible)
NULL (invisible)
ctx <- ggml_init(1024 * 1024)
tensor <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 5)
ggml_set_f32(tensor, c(1, 2, 3, 4, 5))
ggml_get_f32(tensor)
ggml_free(ctx)
ctx <- ggml_init(1024 * 1024)
t <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 5)
ggml_set_f32(t, c(1, 2, 3, 4, 5))
ggml_get_f32(t)
ggml_free(ctx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.