| ggml_dup_tensor | R Documentation |
Creates a copy of a tensor with the same shape and type
ggml_dup_tensor(ctx, tensor)
ctx |
GGML context |
tensor |
Tensor to duplicate |
New tensor pointer with same shape
ctx <- ggml_init(1024 * 1024)
a <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 100)
b <- ggml_dup_tensor(ctx, a)
ggml_nelements(b)
ggml_free(ctx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.