View source: R/tensors.R View source: R/ggml.R
| ggml_new_tensor_1d | R Documentation |
Create 1D tensor
Create 1D Tensor
ggml_new_tensor_1d(ctx, type = GGML_TYPE_F32, ne0)
ggml_new_tensor_1d(ctx, type = GGML_TYPE_F32, ne0)
ctx |
GGML context |
type |
Data type |
ne0 |
Size |
Tensor pointer
Tensor pointer
ctx <- ggml_init(1024 * 1024)
tensor <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 10)
ggml_nelements(tensor)
ggml_free(ctx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.