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