Learn R Programming

ggmlR (version 0.6.1)

ggml_tensor_shape: Get Tensor Shape

Description

Returns the shape of a tensor as a numeric vector of 4 elements (ne0, ne1, ne2, ne3)

Usage

ggml_tensor_shape(tensor)

Value

Numeric vector of length 4 with dimensions

Arguments

tensor

Tensor pointer

Examples

Run this code
# \donttest{
ctx <- ggml_init(1024 * 1024)
t <- ggml_new_tensor_2d(ctx, GGML_TYPE_F32, 10, 20)
ggml_tensor_shape(t)
ggml_free(ctx)
# }

Run the code above in your browser using DataLab