| ggml_new_f32 | R Documentation |
Creates a 1-element tensor containing a single float value. Useful for scalar operations, learning rates, and other scalar floats.
ggml_new_f32(ctx, value)
ctx |
GGML context |
value |
Numeric value |
Tensor pointer (1-element F32 tensor)
ctx <- ggml_init(1024 * 1024)
scalar <- ggml_new_f32(ctx, 3.14)
ggml_get_f32(scalar)
ggml_free(ctx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.