| ggml_cont | R Documentation |
Makes a tensor contiguous in memory. Required after permute/transpose before some operations.
ggml_cont(ctx, a)
ctx |
GGML context |
a |
Input tensor |
Contiguous tensor
ctx <- ggml_init(16 * 1024 * 1024)
a <- ggml_new_tensor_2d(ctx, GGML_TYPE_F32, 3, 4)
ggml_set_f32(a, 1:12)
transposed <- ggml_transpose(ctx, a)
contiguous <- ggml_cont(ctx, transposed)
ggml_free(ctx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.