| ggml_reshape_3d | R Documentation |
Reshapes tensor to 3D with shape (ne0, ne1, ne2)
ggml_reshape_3d(ctx, a, ne0, ne1, ne2)
ctx |
GGML context |
a |
Input tensor |
ne0 |
Size of dimension 0 |
ne1 |
Size of dimension 1 |
ne2 |
Size of dimension 2 |
Reshaped tensor
ctx <- ggml_init(16 * 1024 * 1024)
a <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 24)
ggml_set_f32(a, 1:24)
result <- ggml_reshape_3d(ctx, a, 2, 3, 4)
ggml_free(ctx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.